0.14.0 • Published 1 month ago

@initia/react-components v0.14.0

Weekly downloads
-
License
-
Repository
github
Last release
1 month ago

Num

<Num amount="1234567890" denom="uini" decimalClassName="small" fixedByAmount />

Percent

<Percent>0.98</Percent>

Flex

<Flex justifyContent="center" alignItems="center" gap={4} inline column wrap>
  <Component />
  <Component />
</Flex>

Grid

<Grid gap={4}>
  <Component />
  <Component />
</Grid>

createContext

import { createContext } from "@initia/react-components"

export const [useSharedValue, SharedValueProvider] = createContext<{ value: any }>("SharedValue")

const Component = () => {
  const { value } = useSharedValue()
  // ...
  return null
}

const Wrapper = () => {
  return (
    <SharedValueProvider value={{ value }}>
      <Component />
    </SharedValueProvider>
  )
}

browserStorage

import { browserStorage as storage } from "@initia/react-components"

storage.set("connected", true)
storage.get<boolean>("connected") // true
storage.remove("connected")

storage.set("address", "ini1wlvk4e083pd3nddlfe5quy56e68atra33gzv8h")
storage.get<string>("address") // "ini1wlvk4e083pd3nddlfe5quy56e68atra33gzv8h"
storage.remove("address")

storage.set("network", { name: "mainnet" })
storage.get<{ name: string }>("network") // { name: "mainnet" }
storage.remove("network")

storage.clear()
0.14.0

1 month ago

0.13.0

4 months ago

0.11.0

4 months ago

0.12.0

4 months ago

0.10.0

4 months ago

0.9.0

4 months ago

0.8.0

4 months ago

0.7.0

4 months ago

0.6.0

4 months ago

0.5.0

7 months ago

0.1.0

1 year ago

0.0.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.4.0

1 year ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago