Skip to content

Commit

Permalink
Replaced all the css into tailwind css on Swatch component (#1783)
Browse files Browse the repository at this point in the history
  • Loading branch information
subhajit20 authored Dec 6, 2023
1 parent faef593 commit e85ba69
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
5 changes: 2 additions & 3 deletions components/Branding/Swatch/Swatch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { string } from 'prop-types';
import ScreenReaderOnly from 'components/ScreenReaderOnly/ScreenReaderOnly';
import styles from './Swatch.module.css';

Swatch.propTypes = {
colorName: string.isRequired,
Expand All @@ -9,10 +8,10 @@ Swatch.propTypes = {

function Swatch({ colorName, hexCode }) {
return (
<figure className={styles.Swatch}>
<figure className="border-1 border-solid border-[#333333] p-4 m-6 w-56">
<ScreenReaderOnly>{`A block of the color ${colorName}`}</ScreenReaderOnly>

<div className={styles.colorBlock} style={{ backgroundColor: hexCode }} />
<div className="h-56 mb-4" style={{ backgroundColor: hexCode }} />

<figcaption>
<h6>{colorName.toUpperCase()}</h6>
Expand Down
11 changes: 0 additions & 11 deletions components/Branding/Swatch/Swatch.module.css

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

exports[`Swatch should render with required props 1`] = `
<figure
className="Swatch"
className="border-1 border-solid border-[#333333] p-4 m-6 w-56"
>
<ScreenReaderOnly>
A block of the color Blue
</ScreenReaderOnly>
<div
className="colorBlock"
className="h-56 mb-4"
style={
Object {
"backgroundColor": "#0000FF",
Expand Down

2 comments on commit e85ba69

@vercel
Copy link

@vercel vercel bot commented on e85ba69 Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on e85ba69 Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.