Skip to content

Commit

Permalink
fix: add asset button disappears when changing appearance (#316)
Browse files Browse the repository at this point in the history
* fix: change item to use source code pro

* fix: replace tab bar control buttons with custom icon buttons
  • Loading branch information
kieranroneill authored Sep 17, 2024
1 parent d115f21 commit c3cb4b0
Show file tree
Hide file tree
Showing 17 changed files with 7,850 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/extension/components/AssetsTab/AssetsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const AssetsTab: FC<IProps> = ({ _context, account }) => {
{
button: {
['aria-label']: t<string>('buttons.addAsset'),
icon: <IoAddCircleOutline />,
icon: IoAddCircleOutline,
onClick: handleAddAssetClick,
size: 'sm',
variant: 'ghost',
Expand Down
4 changes: 2 additions & 2 deletions src/extension/components/EmptyState/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ const EmptyState: FC<IProps> = ({
w="full"
{...stackProps}
>
<EmptyIcon h={20} w={20} />
<EmptyIcon boxSize={20} />

<Heading color={defaultTextColor} size="md" textAlign="center">
<Heading color={defaultTextColor} fontSize="md" textAlign="center">
{text}
</Heading>

Expand Down
1 change: 1 addition & 0 deletions src/extension/components/IconButton/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default } from './IconButton';
export * from './types';
5 changes: 4 additions & 1 deletion src/extension/components/TabControlBar/TabControlBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { HStack, IconButton, Spacer, Spinner, Tooltip } from '@chakra-ui/react';
import { HStack, Spacer, Spinner, Tooltip } from '@chakra-ui/react';
import React, { type FC } from 'react';

// components
import IconButton from '@extension/components/IconButton';

// constants
import { DEFAULT_GAP } from '@extension/constants';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { IconButtonProps } from '@chakra-ui/react';
// types
import type { IProps as IIconButtonProps } from '@extension/components/IconButton';

interface ITabControlBarButtonProps {
button: IconButtonProps;
button: IIconButtonProps;
tooltipLabel?: string;
}

Expand Down
3,903 changes: 3,903 additions & 0 deletions src/extension/fonts/SourceCodePro/SourceCodePro-Bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3,899 changes: 3,899 additions & 0 deletions src/extension/fonts/SourceCodePro/SourceCodePro-Regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 22 additions & 0 deletions src/extension/styles/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,25 @@
url('@extension/fonts/Nunito/Nunito-Regular.ttf') format('truetype'),
url('@extension/fonts/Nunito/Nunito-Regular.svg#Nunito-Regular') format('svg');
}

/* source code pro */
@font-face {
font-family: 'SourceCodePro';
font-style: normal;
font-weight: 600 700;
font-display: swap;
src: url('@extension/fonts/SourceCodePro/SourceCodePro-Bold.woff2') format('woff2'),
url('@extension/fonts/SourceCodePro/SourceCodePro-Bold.woff') format('woff'),
url('@extension/fonts/SourceCodePro/SourceCodePro-Bold.ttf') format('truetype'),
url('@extension/fonts/SourceCodePro/SourceCodePro-Bold.svg#SourceCodePro-Bold') format('svg');
}
@font-face {
font-family: 'SourceCodePro';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('@extension/fonts/SourceCodePro/SourceCodePro-Regular.woff2') format('woff2'),
url('@extension/fonts/SourceCodePro/SourceCodePro-Regular.woff') format('woff'),
url('@extension/fonts/SourceCodePro/SourceCodePro-Regular.ttf') format('truetype'),
url('@extension/fonts/SourceCodePro/SourceCodePro-Regular.svg#SourceCodePro-Regular') format('svg');
}
11 changes: 11 additions & 0 deletions src/extension/theme/Code.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineStyle, defineStyleConfig } from '@chakra-ui/react';

const Code = defineStyleConfig({
variants: {
subtle: defineStyle({
fontFamily: 'SourceCodePro',
}),
},
});

export default Code;
File renamed without changes.
6 changes: 4 additions & 2 deletions src/extension/theme/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Dict } from '@chakra-ui/utils';
import { StepsTheme as Steps } from 'chakra-ui-steps';

// themes
import Tag from './tag';
import Code from './Code';
import Tag from './Tag';

const theme: Dict = extendTheme({
breakpoints: {
Expand Down Expand Up @@ -66,8 +67,9 @@ const theme: Dict = extendTheme({
},
},
components: {
Code,
Steps,
Tag,
Tag: Tag,
},
styles: {
global: {
Expand Down

0 comments on commit c3cb4b0

Please sign in to comment.