diff --git a/src/components/AccidentalKey/AccidentalKey.tsx b/src/components/AccidentalKey/AccidentalKey.tsx index d4e7fa8..2839094 100644 --- a/src/components/AccidentalKey/AccidentalKey.tsx +++ b/src/components/AccidentalKey/AccidentalKey.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import * as PropTypes from 'prop-types' -import keyPropTypes from '../../services/keyPropTypes' import styled from 'styled-components' +import keyPropTypes from '../../services/keyPropTypes' const Base = styled('div')({ width: '100%', diff --git a/src/components/Keyboard/Keyboard.stories.tsx b/src/components/Keyboard/Keyboard.stories.tsx index f4945ff..d432207 100644 --- a/src/components/Keyboard/Keyboard.stories.tsx +++ b/src/components/Keyboard/Keyboard.stories.tsx @@ -4,15 +4,10 @@ import StyledAccidentalKey from '../StyledAccidentalKey/StyledAccidentalKey' import StyledNaturalKey from '../StyledNaturalKey/StyledNaturalKey' import Keyboard, { propTypes } from './Keyboard' -interface WrapperProps { - style?: object | null -} - -const Wrapper: React.FC = ({ style, ...etcProps }) => ( +const Wrapper: React.FC = (props) => (
) => ( ) export const Styled = (props?: Partial) => ( - + { - expect(AccidentalKey).toBeDefined() + expect(StyledAccidentalKey).toBeDefined() }) it('should be a React component', () => { - expect(ReactIs.isValidElementType(AccidentalKey)).toBe(true) + expect(ReactIs.isValidElementType(StyledAccidentalKey)).toBe(true) }) it('should render without crashing', () => { - expect(() => ).not.toThrow() + expect(() => ).not.toThrow() }) diff --git a/src/components/StyledAccidentalKey/StyledAccidentalKey.tsx b/src/components/StyledAccidentalKey/StyledAccidentalKey.tsx index 4e7f0b3..cd2f975 100644 --- a/src/components/StyledAccidentalKey/StyledAccidentalKey.tsx +++ b/src/components/StyledAccidentalKey/StyledAccidentalKey.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import * as PropTypes from 'prop-types' -import keyPropTypes from '../../services/keyPropTypes' import styled from 'styled-components' +import keyPropTypes from '../../services/keyPropTypes' const Base = styled('div')({ width: '100%', @@ -20,13 +20,13 @@ const B2 = styled('div')` width: 100%; height: 100%; border-radius: 0 0 1px 1px; - background-color: var(--color-accidental-key, currentColor); + background-color: var(--color-accidental-key, #35313b); mask-image: linear-gradient(to bottom, white, rgba(0, 0, 0, 0.9)); ` const B3 = styled('div')` width: 100%; height: 100%; - background-color: var(--color-accidental-key, currentColor); + background-color: var(--color-accidental-key, #35313b); ` const B4 = styled('div')` width: 100%; diff --git a/src/components/StyledNaturalKey/StyledNaturalKey.tsx b/src/components/StyledNaturalKey/StyledNaturalKey.tsx index 53561f9..dbc9451 100644 --- a/src/components/StyledNaturalKey/StyledNaturalKey.tsx +++ b/src/components/StyledNaturalKey/StyledNaturalKey.tsx @@ -37,7 +37,7 @@ const N3 = styled('div')` const N4 = styled('div')` width: 100%; height: 100%; - background-color: var(--color-natural-key, transparent); + background-color: var(--color-natural-key, #e3e3e5); border-radius: 0 0 1px 1px; ` diff --git a/src/index.ts b/src/index.ts index 9a14c8c..9ef0a5a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,8 @@ import Keyboard from './components/Keyboard/Keyboard' +import StyledNaturalKey from './components/StyledNaturalKey/StyledNaturalKey' +import StyledAccidentalKey from './components/StyledAccidentalKey/StyledAccidentalKey' import keyPropTypes from './services/keyPropTypes' export default Keyboard -export { keyPropTypes } +export { keyPropTypes, StyledNaturalKey, StyledAccidentalKey }