Skip to content

Commit

Permalink
fix(toolbar): Do not import Button into toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan953 committed Nov 16, 2024
1 parent aaa1fa6 commit c3e1c6d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {useContext, useState} from 'react';
import {css} from '@emotion/react';

import {Button} from 'sentry/components/button';
import {resetButtonCss} from 'sentry/components/devtoolbar/styles/reset';
import Input from 'sentry/components/input';
import Switch from 'sentry/components/switchButton';
import {IconAdd} from 'sentry/icons';
Expand Down Expand Up @@ -59,9 +60,18 @@ export default function CustomOverride({
}}
css={{background: 'white'}}
/>
<Button size="xs" type="submit" css={{width: '28px'}} disabled={!name.length}>
<button
type="submit"
css={[
resetButtonCss,
css`
width: 28px;
`,
]}
disabled={!name.length}
>
<IconAdd />
</Button>
</button>
</form>
);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {type Dispatch, Fragment, type SetStateAction, useState} from 'react';
import {css} from '@emotion/react';

import {Button} from 'sentry/components/button';
import {resetButtonCss, resetFlexRowCss} from 'sentry/components/devtoolbar/styles/reset';
import Input from 'sentry/components/input';
import {PanelTable} from 'sentry/components/panels/panelTable';
Expand Down Expand Up @@ -203,9 +203,13 @@ function FlagTable({prefilter, searchTerm}: {prefilter: Prefilter; searchTerm: s
{display: 'block', textAlign: 'center'},
]}
>
<Button
size="xs"
css={{width: '100%'}}
<button
css={[
resetButtonCss,
css`
width: 100%;
`,
]}
onClick={() => {
clearOverrides();
}}
Expand All @@ -222,7 +226,7 @@ function FlagTable({prefilter, searchTerm}: {prefilter: Prefilter; searchTerm: s
>
<IconClose isCircled size="xs" /> Remove All
</span>
</Button>
</button>
</div>
)}
</span>
Expand Down

0 comments on commit c3e1c6d

Please sign in to comment.