Skip to content

Commit

Permalink
Change imports for breakpoints into bpk-component-breakpoint (#2935)
Browse files Browse the repository at this point in the history
  • Loading branch information
olliecurtis authored Jul 27, 2023
1 parent d85e619 commit 2a6882e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import TOKENS from '@skyscanner/bpk-foundations-web/tokens/base.common';
import { spacingBase } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
import { addDecorator } from '@storybook/react';
import { withA11y } from '@storybook/addon-a11y';

Expand All @@ -34,7 +34,7 @@ const EnhancedThemeProvider = updateOnThemeChange(BpkThemeProvider);

addDecorator(withA11y);
addDecorator((story) => (
<div style={{ padding: TOKENS.spacingBase }}>
<div style={{ padding: spacingBase }}>
<EnhancedThemeProvider themeAttributes={themeableAttributes}>
{story()}
</EnhancedThemeProvider>
Expand Down
22 changes: 11 additions & 11 deletions packages/bpk-component-breakpoint/src/BpkBreakpoint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
import type { ReactNode } from 'react';
import MediaQuery from 'react-responsive';
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
import TOKENS from '@skyscanner/bpk-foundations-web/tokens/base.common';
import { breakpoints } from '@skyscanner/bpk-foundations-web/tokens/base.es6';

const BREAKPOINTS = {
SMALL_MOBILE: TOKENS.breakpointQuerySmallMobile,
MOBILE: TOKENS.breakpointQueryMobile,
SMALL_TABLET: TOKENS.breakpointQuerySmallTablet,
SMALL_TABLET_ONLY: TOKENS.breakpointQuerySmallTabletOnly,
TABLET: TOKENS.breakpointQueryTablet,
TABLET_ONLY: TOKENS.breakpointQueryTabletOnly,
ABOVE_MOBILE: TOKENS.breakpointQueryAboveMobile,
ABOVE_TABLET: TOKENS.breakpointQueryAboveTablet,
ABOVE_DESKTOP: TOKENS.breakpointQueryAboveDesktop,
DESKTOP_ONLY: TOKENS.breakpointQueryDesktopOnly,
SMALL_MOBILE: breakpoints.breakpointQuerySmallMobile,
MOBILE: breakpoints.breakpointQueryMobile,
SMALL_TABLET: breakpoints.breakpointQuerySmallTablet,
SMALL_TABLET_ONLY: breakpoints.breakpointQuerySmallTabletOnly,
TABLET: breakpoints.breakpointQueryTablet,
TABLET_ONLY: breakpoints.breakpointQueryTabletOnly,
ABOVE_MOBILE: breakpoints.breakpointQueryAboveMobile,
ABOVE_TABLET: breakpoints.breakpointQueryAboveTablet,
ABOVE_DESKTOP: breakpoints.breakpointQueryAboveDesktop,
DESKTOP_ONLY: breakpoints.breakpointQueryDesktopOnly,
} as const;

type Props = {
Expand Down

0 comments on commit 2a6882e

Please sign in to comment.