Skip to content

Commit

Permalink
fix(mesh-ui): small style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyaaa committed Apr 3, 2024
1 parent 9b7ee69 commit 0405f9e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
3 changes: 2 additions & 1 deletion packages/react/.storybook/story-global.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ svg {
input,
button,
textarea,
select {
select,
output {
font: inherit;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/react/stories/mesh/MeshStaking.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const MeshSlider = () => {
as="output"
color="$text"
fontSize="$md"
fontFamily="$body"
attributes={outputProps}
>
{`${formatNumeric(valuePercent * TOTAL_TOKENS, 2)}`}
Expand All @@ -78,6 +79,7 @@ const MeshSlider = () => {
color={useColorModeValue("$textSecondary", "$textPlaceholder")}
fontSize="$sm"
fontWeight="$light"
fontFamily="$body"
attributes={labelProps}
>
OSMO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ const Header = (props: {
space="$14"
attributes={{
position: "relative",
// Parent width + x padding
width: "calc(100% + 64px)",
width: "100%",
}}
>
<Stack
Expand Down Expand Up @@ -146,7 +145,7 @@ const Header = (props: {
<Divider
position="absolute"
bottom="0"
transform="translateX(-32px)"
transform="scaleX(1.2)"
zIndex={0}
/>
</Stack>
Expand All @@ -170,7 +169,12 @@ export const InterchainUITheme: Story = {

return (
<Box maxWidth={MAX_CONTAINER_WIDTH}>
<Box backgroundColor="$cardBg" p="$12" borderRadius="$md">
<Box
overflow="hidden"
backgroundColor="$cardBg"
p="$12"
borderRadius="$md"
>
<Header isDefaultTheme assets={headerAssets} />

<Box
Expand Down Expand Up @@ -223,7 +227,12 @@ export const MeshUICustomTheme: Story = {
return (
<MeshProvider>
<Box maxWidth={MAX_CONTAINER_WIDTH}>
<Box backgroundColor="$cardBg" p="$12" borderRadius="$md">
<Box
overflow="hidden"
backgroundColor="$cardBg"
p="$12"
borderRadius="$md"
>
<Header assets={headerAssets} />

<Box
Expand Down
2 changes: 1 addition & 1 deletion src/styles/global.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ globalStyle(`img, picture, video, canvas, svg`, {
maxWidth: `100%`,
});

globalStyle(`input, button, textarea, select`, {
globalStyle(`input, button, textarea, select, output`, {
font: `inherit`,
});

Expand Down
7 changes: 5 additions & 2 deletions src/ui/mesh-staking/mesh-table.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ export default function MeshTable(props: MeshTableProps) {

if (pinnedTableMeasureRef) {
const scrollHandler2 = () => {
const isScrollable1 =
const isScrollable2 =
pinnedTableMeasureRef.scrollHeight >
pinnedTableMeasureRef.clientHeight;

if (!isScrollable1) {
if (!isScrollable2) {
return (state.displayPinnedTableBottomShadow = false);
}

Expand Down Expand Up @@ -487,6 +487,9 @@ export default function MeshTable(props: MeshTableProps) {
<Box
boxRef={shadowRef}
position="absolute"
display={
!props.pinnedIds || props.pinnedIds.length === 0 ? "none" : "block"
}
width="$full"
bottom="$0"
className={standardTransitionProperties}
Expand Down

0 comments on commit 0405f9e

Please sign in to comment.