Skip to content

Commit ae13a24

Browse files
committed
fix(CopySnippet): allow to change border radius
1 parent 9dba088 commit ae13a24

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/components/content/Alert/use-alert.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
BASE_STYLES,
32
CONTAINER_STYLES,
43
TEXT_STYLES,
54
extractStyles,
@@ -9,11 +8,7 @@ import { useDeprecationWarning } from '../../../_internal';
98

109
import { CubeAlertProps } from './types';
1110

12-
const STYLE_LIST = [
13-
...CONTAINER_STYLES,
14-
...BASE_STYLES,
15-
...TEXT_STYLES,
16-
] as const;
11+
const STYLE_LIST = [...CONTAINER_STYLES, ...TEXT_STYLES] as const;
1712

1813
export function useAlert(props: CubeAlertProps) {
1914
const { type, isDisabled = false, theme } = props;

src/components/content/CopySnippet/CopySnippet.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import copy from 'clipboard-copy';
33

44
import { Action, Button } from '../../actions';
55
import { Card, CubeCardProps } from '../Card/Card';
6-
import { tasty } from '../../../tasty';
6+
import { CONTAINER_STYLES, tasty } from '../../../tasty';
77
import {
88
CubePrismCodeProps,
99
PrismCode,
@@ -89,18 +89,18 @@ const CopySnippetElement = tasty(Card, {
8989
padding: 0,
9090
preset: 'default',
9191
radius: '1r',
92+
overflow: 'hidden',
9293

9394
Grid: {
9495
display: 'grid',
9596
flow: 'row',
9697
gridColumns: 'minmax(0, 1fr) auto',
9798
gridRows: 'minmax(0, 1fr)',
9899
width: 'min 20x',
99-
radius: '1r',
100100
position: 'relative',
101-
overflow: 'hidden',
102101
},
103102
},
103+
styleProps: [...CONTAINER_STYLES],
104104
});
105105

106106
const ActionButton = tasty(Button, {

0 commit comments

Comments
 (0)