Skip to content

Commit 020768a

Browse files
authored
fix(examples): update slider import to actual deployed package (#35)
* chore(examples): install sliders dependency * fix(examples): use actual package * docs(readme): remove mention about perfekt * chore(prettier): ignore changelog * docs(example): update link to CodeSandbox * docs: add list of links to CodeSandbox examples
1 parent ca7b16e commit 020768a

File tree

9 files changed

+18
-7
lines changed

9 files changed

+18
-7
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
node_modules
22
.cache
33
dist
4+
5+
# Generated by `semantic-release`
6+
CHANGELOG.md

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
- [x] Fully typed with TypeScript
4141
- [x] Based on [our already existing open source tools](https://www.strv.io/tools/frontend)
4242
- [`code-quality-tools`](https://github.com/strvcom/code-quality-tools)
43-
- [`perfekt`](https://github.com/lekterable/perfekt)
4443

4544
## Install
4645

@@ -109,6 +108,8 @@ const SliderExample = () => {
109108
}
110109
```
111110

111+
If you want so see more, head to the [list of existing CodeSandbox examples](examples/README.md).
112+
112113
### Hooks API
113114

114115
- [`useSlider`](src/hooks/docs/useSlider.md)

examples/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CodeSandbox Examples
2+
3+
- [with `styled-components`](https://codesandbox.io/s/github/strvcom/react-sliders/tree/master/examples/with-styled-components)

examples/with-styled-components/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
You can play with the example on:
44

5-
- [CodeSandbox](TODO)
5+
- [CodeSandbox](https://codesandbox.io/s/github/strvcom/react-sliders/tree/master/examples/with-styled-components)
66
- Run and play around locally by running `npm run start` inside `/examples/with-styled-components`

examples/with-styled-components/components/RangeSlider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from 'react'
2+
import { useRangeSlider, IRangeMarker, TRangeTuple } from '@strv/react-sliders'
23

34
import {
45
SliderContainer,
@@ -9,8 +10,6 @@ import {
910
SliderMarkerLabel,
1011
} from '../styles'
1112

12-
import { useRangeSlider, IRangeMarker, TRangeTuple } from '../../../dist'
13-
1413
export interface IRangeSliderProps {
1514
value: TRangeTuple
1615
min: number

examples/with-styled-components/components/Slider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from 'react'
2+
import { useSlider, IRangeMarker } from '@strv/react-sliders'
23

34
import {
45
SliderContainer,
@@ -9,8 +10,6 @@ import {
910
SliderMarker,
1011
} from '../styles'
1112

12-
import { useSlider, IRangeMarker } from '../../../dist'
13-
1413
export interface ISliderProps {
1514
value: number
1615
min: number

examples/with-styled-components/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import 'react-app-polyfill/ie11'
22
import * as React from 'react'
33
import * as ReactDOM from 'react-dom'
4+
import { TRangeTuple } from '@strv/react-sliders'
45

56
import { Slider } from './components/Slider'
67
import { RangeSlider } from './components/RangeSlider'
7-
import { TRangeTuple } from '../../dist'
88

99
const markers = [
1010
{ value: 0 },

examples/with-styled-components/package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/with-styled-components/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build": "parcel build index.html"
99
},
1010
"dependencies": {
11+
"@strv/react-sliders": "^1.0.0",
1112
"react": "^16.13.1",
1213
"react-app-polyfill": "^1.0.0",
1314
"react-dom": "^16.13.1",

0 commit comments

Comments
 (0)