Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BD-46] docs: add info about xs min-width #2400

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion www/src/pages/foundations/responsive.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import { DataTable, Container, breakpoints } from '~paragon-react';
import {
DataTable, Container, breakpoints, OverlayTrigger, Tooltip, Icon,
} from '~paragon-react';
import { Question } from '~paragon-icons';
import SEO from '../../components/SEO';
import Layout from '../../components/PageLayout';
import CodeBlock from '../../components/CodeBlock';
Expand All @@ -20,6 +23,26 @@ function IdentifierCell({ row }) {
return <code>{row.values.identifier}</code>;
}
function MinWidthCell({ row }) {
if (row.values.identifier === 'xs') {
return (
<div className="d-flex">
<code>-</code>
<OverlayTrigger
placement="top"
defaultShow
overlay={(
<Tooltip id={`tooltip-${row.values.identifier}`}>
The min-width for the &quot;XS&quot; breakpoint is <strong>320px</strong>.
That pixel width is the smallest that designers support for mobile devices,
and also covers 16x magnification for accessibility.
</Tooltip>
)}
>
<Icon src={Question} size="xs" />
</OverlayTrigger>
</div>
);
}
return <code>{row.values.minWidth ? `${row.values.minWidth}px` : '-'}</code>;
}
function MaxWidthCell({ row }) {
Expand Down
Loading