mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 18:09:09 +00:00
try editor as preview
This commit is contained in:
parent
7d681d69d6
commit
67fac31ab4
8 changed files with 163 additions and 39 deletions
26
packages/design-system/atoms/breakpoints/BreakpointText.tsx
Normal file
26
packages/design-system/atoms/breakpoints/BreakpointText.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import styled, { css } from 'styled-components';
|
||||
import { onSmallScreen } from './Breakpoints';
|
||||
|
||||
const ShowOnSmall = styled.span`
|
||||
display: none;
|
||||
${onSmallScreen(css`
|
||||
display: initial;
|
||||
`)}
|
||||
`;
|
||||
|
||||
const ShowOnLarge = styled.span`
|
||||
display: initial;
|
||||
${onSmallScreen(css`
|
||||
display: none;
|
||||
`)}
|
||||
`;
|
||||
|
||||
export const BreakpointText = (props: { small: string; large: string }) => {
|
||||
const { small, large } = props;
|
||||
return (
|
||||
<>
|
||||
<ShowOnSmall>{small}</ShowOnSmall>
|
||||
<ShowOnLarge>{large}</ShowOnLarge>
|
||||
</>
|
||||
);
|
||||
};
|
|
@ -1,3 +1,4 @@
|
|||
export * from './BreakpointProvider';
|
||||
export * from './Breakpoints';
|
||||
export * from './BreakpointText';
|
||||
export * from './Context';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue