Skip to content

Commit

Permalink
feat(react,styles): remove Card component and styles (#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
scurker authored Dec 15, 2023
1 parent 7b5349d commit 9b55195
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 288 deletions.
61 changes: 0 additions & 61 deletions docs/pages/components/Card.mdx

This file was deleted.

66 changes: 0 additions & 66 deletions packages/react/__tests__/src/components/Card/index.js

This file was deleted.

20 changes: 0 additions & 20 deletions packages/react/src/components/Card/Card.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions packages/react/src/components/Card/CardContent.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions packages/react/src/components/Card/CardFooter.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions packages/react/src/components/Card/CardHeader.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions packages/react/src/components/Card/index.ts

This file was deleted.

11 changes: 5 additions & 6 deletions packages/react/src/components/RadioCardGroup/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useRef, useEffect } from 'react';
import classNames from 'classnames';
import Icon, { IconType } from '../Icon';
import Card, { CardContent } from '../Card';
import Panel, { PanelContent } from '../Panel';

export interface RadioItem extends React.InputHTMLAttributes<HTMLInputElement> {
label: React.ReactNode;
Expand Down Expand Up @@ -72,8 +72,7 @@ const RadioCardGroup = ({

return (
<div className={classNames('RadioCard')} key={index}>
<Card
variant="simple"
<Panel
className={classNames('RadioCardGroup__Card RadioCard__overlay', {
'RadioCard__overlay--focused': isFocused,
'RadioCard__overlay--checked': isChecked,
Expand Down Expand Up @@ -103,7 +102,7 @@ const RadioCardGroup = ({
checked={isChecked}
{...other}
/>
<CardContent>
<PanelContent>
<div className={classNames('RadioCardGroup__Checked')}>
{isChecked && (
<Icon
Expand All @@ -124,8 +123,8 @@ const RadioCardGroup = ({
{label}
</label>
</div>
</CardContent>
</Card>
</PanelContent>
</Panel>
</div>
);
});
Expand Down
6 changes: 0 additions & 6 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ export {
TooltipContent
} from './components/Tooltip';
export { default as TooltipTabstop } from './components/TooltipTabstop';
export {
default as Card,
CardHeader,
CardContent,
CardFooter
} from './components/Card';
export { default as TextField } from './components/TextField';
export { default as ClickOutsideListener } from './components/ClickOutsideListener';
export {
Expand Down
81 changes: 0 additions & 81 deletions packages/styles/card.css

This file was deleted.

1 change: 0 additions & 1 deletion packages/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
@import './select.css';
@import './side-bar.css';
@import './radio-card.css';
@import './card.css';
@import './toast.css';
@import './tooltip.css';
@import './tooltip-tabstop.css';
Expand Down
11 changes: 10 additions & 1 deletion packages/styles/radio-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,17 @@
width: 44px;
}

.RadioCardGroup__Card.Card--simple {
.RadioCardGroup__Card {
width: var(--radio-card-width);
height: var(--radio-card-height);
align-content: center;
}

.RadioCardGroup__Card .Panel__Content {
padding-top: 0;
padding-bottom: 0;
}

.RadioCardGroup__Card:hover {
background-color: var(--gray-20);
}
Expand Down Expand Up @@ -92,3 +97,7 @@
.cauldron--theme-dark .RadioCardGroup__Icon.Icon svg {
color: var(--accent-success);
}

.cauldron--theme-dark .RadioCardGroup__Card {
background-color: var(--dark-workspace-color);
}

0 comments on commit 9b55195

Please sign in to comment.