try editor as preview

This commit is contained in:
41666 2021-07-05 19:51:51 -05:00
parent 7d681d69d6
commit 67fac31ab4
8 changed files with 163 additions and 39 deletions

View 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>
</>
);
};

View file

@ -1,3 +1,4 @@
export * from './BreakpointProvider';
export * from './Breakpoints';
export * from './BreakpointText';
export * from './Context';