Update snippet formatting
This commit is contained in:
@ -9,7 +9,7 @@ Renders a slider element that uses a callback function to pass its value to the
|
||||
- Render an `<input>` element of type `"range"` and the appropriate attributes, use the `callback` function in the `onChange` event to pass the value of the input to the parent.
|
||||
|
||||
```jsx
|
||||
function Slider({ callback, disabled = false, readOnly = false }) {
|
||||
const Slider = ({ callback, disabled = false, readOnly = false }) => {
|
||||
return (
|
||||
<input
|
||||
type="range"
|
||||
@ -18,7 +18,7 @@ function Slider({ callback, disabled = false, readOnly = false }) {
|
||||
onChange={({ target: { value } }) => callback(value)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
```jsx
|
||||
|
||||
Reference in New Issue
Block a user