diff --git a/ui/components/demos/tap.js b/ui/components/demos/tap.js index fe73870..587557d 100644 --- a/ui/components/demos/tap.js +++ b/ui/components/demos/tap.js @@ -2,15 +2,12 @@ import * as React from 'react' import styled from 'styled-components' import Role from '../role/demo' - -const roles = [ - 'cute', 'vanity', 'brave', 'proud', 'wonderful', '日本語' -] +import demoRoles from '../../config/demo' const DemoWrapper = styled.div` text-align: center; ` export default () => - { roles.map((v, i) => ) } + { demoRoles.map((v, i) => ) } diff --git a/ui/components/demos/typing.js b/ui/components/demos/typing.js index 725c9a3..869971f 100644 --- a/ui/components/demos/typing.js +++ b/ui/components/demos/typing.js @@ -3,6 +3,7 @@ import moment from 'moment' import Typist from 'react-typist' import styled from 'styled-components' import MediaQuery from '../../kit/media' +import demoRoles from '../../config/demo' const Outer = styled.div` background-color: var(--dark-but-not-black); @@ -72,18 +73,10 @@ const Typing = () => diff --git a/ui/config/demo.js b/ui/config/demo.js new file mode 100644 index 0000000..b17be9f --- /dev/null +++ b/ui/config/demo.js @@ -0,0 +1,8 @@ +export default [ + 'cute', + 'vanity', + 'brave', + 'proud', + 'wonderful', + '日本語' +].map((name, i, roles) => ({ name: `a ${name} role ♡`, color: `hsl(${(360 / roles.length) * i},40%,70%)` }))