-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: améliore le design du formulaire des métadonnées
- Loading branch information
1 parent
6f8bd20
commit cd0485f
Showing
8 changed files
with
142 additions
and
38 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,17 @@ | ||
import React from 'react' | ||
import { Check, Copy } from 'react-feather' | ||
import Button from '../components/Button.jsx' | ||
|
||
export default function ButtonStory () { | ||
return <> | ||
<h2>Buttons</h2> | ||
<h4>Primary</h4> | ||
<Button primary={true}>Create New Article</Button> | ||
<h4>Secondary</h4> | ||
<Button>Manage Tags</Button> | ||
<h4>With Icon</h4> | ||
<Button><Check/> Save</Button> | ||
<h4>Icon Only</h4> | ||
<Button icon={true}><Copy/></Button> | ||
</> | ||
} |
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,11 @@ | ||
import React from 'react' | ||
import SchemaForm from '../components/Form.jsx' | ||
import schema from './form-story.schema.json' | ||
import uiSchema from './form-story-ui-schema.json' | ||
|
||
export default function FormStory() { | ||
return <> | ||
<h2>Form</h2> | ||
<SchemaForm formData={{}} uiSchema={uiSchema} schema={schema}/> | ||
</> | ||
} |
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,38 @@ | ||
import { Tabs } from '@geist-ui/core' | ||
import React from 'react' | ||
import { Search } from 'react-feather' | ||
import buttonStyles from '../components/button.module.scss' | ||
import Field from '../components/Field.jsx' | ||
import Select from '../components/Select.jsx' | ||
import ButtonStory from './Button.story.jsx' | ||
import FormStory from './Form.story.jsx' | ||
|
||
import styles from './story.module.scss' | ||
|
||
export default function Story () { | ||
return <div className={styles.container}> | ||
<Tabs initialValue="1"> | ||
<Tabs.Item label="buttons" value="1"> | ||
<ButtonStory/> | ||
</Tabs.Item> | ||
<Tabs.Item label="form" value="2"> | ||
<FormStory/> | ||
</Tabs.Item> | ||
<Tabs.Item label="fields" value="3"> | ||
<h2>Fields</h2> | ||
<h4>Search</h4> | ||
<Field placeholder="Search" icon={Search}/> | ||
<h4>Textarea</h4> | ||
<div style={{ 'max-width': '50%' }}> | ||
<textarea className={buttonStyles.textarea} rows="10">Du texte</textarea> | ||
</div> | ||
<h4>Select</h4> | ||
<Select> | ||
<option>Tome de Savoie</option> | ||
<option>Reblochon</option> | ||
<option>St Marcellin</option> | ||
</Select> | ||
</Tabs.Item> | ||
</Tabs> | ||
</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,22 @@ | ||
{ | ||
"ui:groups": [ | ||
{ | ||
"title": "Article", | ||
"fields": [ | ||
"id", | ||
"date", | ||
"url", | ||
"license" | ||
] | ||
}, | ||
{ | ||
"title": "Issue", | ||
"fields": [ | ||
"issue" | ||
] | ||
} | ||
], | ||
"date": { | ||
"ui:widget": "date" | ||
} | ||
} |
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,32 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
}, | ||
"date": { | ||
"type": "string", | ||
"format": "date" | ||
}, | ||
"url": { | ||
"type": "string" | ||
}, | ||
"license": { | ||
"type": "string" | ||
}, | ||
"issue": { | ||
"type": "object", | ||
"properties": { | ||
"title": { | ||
"type": "string" | ||
}, | ||
"identifier": { | ||
"type": "string" | ||
}, | ||
"number": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} |
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,11 @@ | ||
.container { | ||
padding: 0.25rem | ||
} | ||
|
||
.container { | ||
:global { | ||
.content { | ||
padding: 1rem; | ||
} | ||
} | ||
} |