
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@omakase-ui/react-responsive-design-mode
Advanced tools
@omakase-ui/react-responsive-design-mode 👋 <img alt="Version" src="https://img.shields.io/npm/v/@omakase-ui/react-responsi
yarn add @omakase-ui/react-responsive-design-mode
if you don't use Tailwind CSS
import { ResponsiveDesignMode } from '@omakase-ui/react-responsive-design-mode';
import '@omakase-ui/react-responsive-design-mode/dist/index.css';
if you use Tailwind CSS
import { ResponsiveDesignMode } from '@omakase-ui/react-responsive-design-mode';
modify tailwind.config.js
// tailwind.config.js
+ const path = require("path");
module.exports = {
content: [
"./src/**/*{js,ts,jsx,tsx}",
+ path.join(
+ require.resolve("@omakase-ui/react-responsive-design-mode"),
+ "../**/*.{js,ts,jsx,tsx}"
+ ),
],
theme: {},
plugins: [],
};
export const Standard = () => {
const [visible, setVisible] = useState(true);
return (
<div>
<button onClick={() => setVisible(true)} className="btn-primary btn">
Enter Responsive Design Mode
</button>
<ResponsiveDesignMode
visible={visible}
onClose={() => setVisible(false)}
title="Responsive Design Mode"
>
{({ device }) => (
<div className=" text-center ">
<h1 className="my-8">
The UI in <strong>{device}</strong>
</h1>
<div
className={classNames(' mx-auto', {
'grid grid-cols-3 gap-4': device === 'Desktop',
'grid grid-cols-2 gap-4': device === 'Tablet',
'grid grid-cols-1 gap-4': device === 'Mobile',
})}
>
<div className="btn-square btn w-full bg-purple-400"></div>
<div className="btn-square btn w-full bg-purple-400"></div>
<div className="btn-square btn w-full bg-purple-400"></div>
</div>
</div>
)}
</ResponsiveDesignMode>
</div>
);
};
yarn storybook
yarn test
👤 Thaddeus Jiang
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2022 Thaddeus Jiang.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator
FAQs
@omakase-ui/react-responsive-design-mode 👋 <img alt="Version" src="https://img.shields.io/npm/v/@omakase-ui/react-responsi
We found that @omakase-ui/react-responsive-design-mode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.