-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #217 from mapbox/control-range-styles
control range styles
- Loading branch information
Showing
4 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/components/control-range/examples/control-range-example-style.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
Additional Style Options | ||
*/ | ||
import React, { useState } from 'react'; | ||
import ControlRange from '../control-range'; | ||
|
||
export default function Example() { | ||
const [value, setValue] = useState([25]); | ||
return ( | ||
<ControlRange | ||
id="name" | ||
optional={true} | ||
value={[...value]} | ||
min={10} | ||
max={100} | ||
step={1} | ||
onChange={setValue} | ||
tooltip={true} | ||
themeControlRangeActive='bg-blue round' | ||
themeControlTrack='bg-gray h3' | ||
themeControlThumb='bg-blue border--0 h12 w12 shadow-darken25' | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters