🚧 [components] Work on draft/pattern settings/options
This commit is contained in:
parent
3ca3742953
commit
c0690d5496
30 changed files with 2195 additions and 128 deletions
27
packages/components/src/DraftSettingLanguage/stories.js
Normal file
27
packages/components/src/DraftSettingLanguage/stories.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
import React from "react";
|
||||
import { storiesOf } from "@storybook/react";
|
||||
import Lang from ".";
|
||||
|
||||
const props = {
|
||||
triggerAction: (type, data) =>
|
||||
console.log(`Action of type ${type} triggered, data passed is`, data),
|
||||
updateValue: (name, value) =>
|
||||
console.log(`Updated setting ${name}, value is now: ${value}`),
|
||||
name: "exampleDraftSettingLanguage",
|
||||
dflt: "en",
|
||||
title:
|
||||
"I am a language draft setting. This is my title. I'm wrapped in an h4 tag",
|
||||
desc:
|
||||
"This is the description. I'm wrapped in a p tag. This component only sets the CSS class on a non-default value. It's up to you to supply the CSS to style it.",
|
||||
languages: {
|
||||
de: "German",
|
||||
en: "English",
|
||||
es: "Spanish",
|
||||
fr: "French",
|
||||
nl: "Dutch"
|
||||
}
|
||||
};
|
||||
|
||||
storiesOf("DraftSettingLanguage", module).add("Basic", () => (
|
||||
<Lang {...props} />
|
||||
));
|
Loading…
Add table
Add a link
Reference in a new issue