Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(imports): admin ui button imports #4869

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions resources/scripts/components/admin/nodes/NodesContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ import AdminTable, {
ContentWrapper,
useTableHooks,
} from '@/components/admin/AdminTable';
import Button from '@/components/elements/Button';
import { Button } from '@/components/elements/button';
import CopyOnClick from '@/components/elements/CopyOnClick';
import { bytesToString, mbToBytes } from '@/lib/formatters';
import { Size } from '@/components/elements/button/types';

const RowCheckbox = ({ id }: { id: number }) => {
const isChecked = AdminContext.useStoreState(state => state.nodes.selectedNodes.indexOf(id) >= 0);
Expand Down Expand Up @@ -94,7 +95,7 @@ const NodesContainer = () => {

<div css={tw`flex ml-auto pl-4`}>
<NavLink to={`/admin/nodes/new`}>
<Button type={'button'} size={'large'} css={tw`h-10 px-4 py-0 whitespace-nowrap`}>
<Button type={'button'} size={Size.Large} css={tw`h-10 px-4 py-0 whitespace-nowrap`}>
New Node
</Button>
</NavLink>
Expand Down
11 changes: 6 additions & 5 deletions resources/scripts/components/admin/roles/NewRoleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { object, string } from 'yup';

import { getRoles, createRole } from '@/api/admin/roles';
import FlashMessageRender from '@/components/FlashMessageRender';
import Button from '@/components/elements/Button';
import { Button } from '@/components/elements/button';
import Field from '@/components/elements/Field';
import Modal from '@/components/elements/Modal';
import useFlash from '@/plugins/useFlash';
import { Size, Variant } from '@/components/elements/button/types';

interface Values {
name: string;
Expand Down Expand Up @@ -77,14 +78,14 @@ export default () => {
</div>

<div css={tw`flex flex-wrap justify-end mt-6`}>
<Button
<Button.Text
type={'button'}
isSecondary
variant={Variant.Secondary}
css={tw`w-full sm:w-auto sm:mr-2`}
onClick={() => setVisible(false)}
>
Cancel
</Button>
</Button.Text>
<Button css={tw`w-full mt-4 sm:w-auto sm:mt-0`} type={'submit'}>
Create Role
</Button>
Expand All @@ -96,7 +97,7 @@ export default () => {

<Button
type={'button'}
size={'large'}
size={Size.Large}
css={tw`h-10 px-4 py-0 whitespace-nowrap`}
onClick={() => setVisible(true)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import tw from 'twin.macro';
import FlashMessageRender from '@/components/FlashMessageRender';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
import ServersTable from '@/components/admin/servers/ServersTable';
import Button from '@/components/elements/Button';
import { Button } from '@/components/elements/button';
import { Size } from '@/components/elements/button/types';

function ServersContainer() {
return (
Expand All @@ -19,7 +20,7 @@ function ServersContainer() {

<div css={tw`flex ml-auto pl-4`}>
<NavLink to={`/admin/servers/new`}>
<Button type={'button'} size={'large'} css={tw`h-10 px-4 py-0 whitespace-nowrap`}>
<Button type={'button'} size={Size.Large} css={tw`h-10 px-4 py-0 whitespace-nowrap`}>
New Server
</Button>
</NavLink>
Expand Down