-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
1,450 additions
and
320 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
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,36 @@ | ||
import React from 'react' | ||
import { makeStyles } from '@krowdy-ui/core/styles' | ||
import { notify } from '@krowdy-ui/core' | ||
|
||
const useStyles = makeStyles(theme => ({ | ||
root: { | ||
backgroundColor: theme.palette.background.paper, | ||
flexGrow : 1 | ||
} | ||
})) | ||
|
||
export default function SimpleTabs() { | ||
const classes = useStyles() | ||
|
||
const _handleClickSuccess = () => { | ||
notify.success('!Notify!', { time: 5000 }) | ||
} | ||
|
||
const _handleClickWarning = () => { | ||
notify.warning('!Notify!', { time: 5000 }) | ||
} | ||
|
||
const _handleClickError = () => { | ||
notify.error('!Notify!', { time: 5000 }) | ||
} | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<button onClick={_handleClickSuccess}>Notify Success</button> | ||
<br /> | ||
<button onClick={_handleClickWarning}>Notify Warning</button> | ||
<br /> | ||
<button onClick={_handleClickError}>Notify Error</button> | ||
</div> | ||
) | ||
} |
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,7 @@ | ||
# Notify | ||
|
||
<p class="description">View Notify.</p> | ||
|
||
## Notify Example | ||
|
||
{{"demo": "containers/components/notify/notify.js", "bg": true}} |
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,36 @@ | ||
import React from 'react' | ||
import { makeStyles } from '@krowdy-ui/core/styles' | ||
import { notify } from '@krowdy-ui/core' | ||
|
||
const useStyles = makeStyles(theme => ({ | ||
root: { | ||
backgroundColor: theme.palette.background.paper, | ||
flexGrow : 1 | ||
} | ||
})) | ||
|
||
export default function SimpleTabs() { | ||
const classes = useStyles() | ||
|
||
const _handleClickSuccess = () => { | ||
notify.success('!Notify!', { time: 5000 }) | ||
} | ||
|
||
const _handleClickWarning = () => { | ||
notify.warning('!Notify!', { time: 5000 }) | ||
} | ||
|
||
const _handleClickError = () => { | ||
notify.error('!Notify!', { time: 5000 }) | ||
} | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<button onClick={_handleClickSuccess}>Notify Success</button> | ||
<br /> | ||
<button onClick={_handleClickWarning}>Notify Warning</button> | ||
<br /> | ||
<button onClick={_handleClickError}>Notify Error</button> | ||
</div> | ||
) | ||
} |
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
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
File renamed without changes.
44 changes: 44 additions & 0 deletions
44
docs/src/containers/views/radioLabelGroup/RadioLabelGroup.js
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,44 @@ | ||
import React, { useState } from 'react' | ||
import { RadioLabelGroup } from '@krowdy-ui/views' | ||
|
||
const items = [ | ||
{ | ||
label: 'Female', | ||
value: 'female' | ||
}, | ||
{ | ||
label: 'Male', | ||
value: 'male' | ||
}, | ||
{ | ||
label: 'Other', | ||
value: 'other' | ||
} | ||
] | ||
|
||
export default function () { | ||
const [ value, setValue ] = useState('male') | ||
|
||
const _handleChange = event => { | ||
setValue(event.target.value) | ||
} | ||
|
||
return ( | ||
<div style={{ | ||
alignItems : 'center', | ||
display : 'flex', | ||
flexDirection : 'column', | ||
height : 400, | ||
justifyContent: 'space-evenly', | ||
margin : 50, | ||
width : 'auto' | ||
}}> | ||
<RadioLabelGroup | ||
isRow | ||
items={items} | ||
name='Gender' | ||
onChange={_handleChange} | ||
value={value} /> | ||
</div> | ||
) | ||
} |
10 changes: 10 additions & 0 deletions
10
docs/src/containers/views/radioLabelGroup/RadioLabelGroup.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,10 @@ | ||
import { RadioLabelGroup } from '@krowdy-ui/views' | ||
import React from 'react' | ||
|
||
export default function () { | ||
return ( | ||
<div> | ||
<RadioLabelGroup items={[]} /> | ||
</div> | ||
) | ||
} |
21 changes: 21 additions & 0 deletions
21
docs/src/containers/views/radioLabelGroup/radioLabelGroup.md
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,21 @@ | ||
# RadioLabelGroup | ||
|
||
<p class="description">Radio Group with labels</p> | ||
|
||
{{"demo": "containers/views/radioLabelGroup/RadioLabelGroup.js"}} | ||
|
||
<h1> | ||
Props: | ||
</h1> | ||
|
||
| Name | Type | Default | Description | | ||
|:------------------------------------|:---------------------|:---------|:-------------| | ||
| classes | object | | | | ||
| isRow | bool | | Define if items are listed in horizontal mode | | ||
| name | string | | The name used to reference the value of the control. | | ||
| onChange | func | | | | ||
| value | any | | Value of the selected radio button. | | ||
| items | `{ label: string, value: any }[]` | [] | Items list | | ||
| | | | | | ||
|
||
|
Oops, something went wrong.