Skip to content

Commit

Permalink
Merge pull request #34 from hemilabs/theth-symbol
Browse files Browse the repository at this point in the history
Allow overriding Button case
  • Loading branch information
gabmontes authored May 2, 2024
2 parents f354ae8 + 17ba5fd commit 1cb50f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion site/components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ const Button = function ({
...props
}) {
const boxStyle = `py-3 rounded-xl ${width} focus:outline-none`
const textStyle = 'text-center text-base text-white capitalize'
const textCase = className
.split(' ')
.filter(Boolean)
.some(c => ['lowercase', 'normal-case', 'uppercase'].includes(c))
? ''
: 'capitalize'
const textStyle = `text-center text-base text-white ${textCase}`
const stateStyle = disabled
? 'bg-gray-200 cursor-not-allowed'
: 'bg-black hover:bg-gray-800'
Expand Down
4 changes: 2 additions & 2 deletions site/pages/[locale]/wrap-eth.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const WrapUnwrapEth = function () {

const [errorMessage, setErrorMessage] = useTemporalMessage()
const [successMessage, setSuccessMessage] = useTemporalMessage()
const { nativeTokenSymbol = 'hETH' } = findByChainId(chainId)
const { nativeTokenSymbol = 'ETH' } = findByChainId(chainId)

const isValidNumber =
value !== '' &&
Expand Down Expand Up @@ -184,7 +184,7 @@ const WrapUnwrapEth = function () {
/>
</div>
<Button
className="mt-7.5 uppercase"
className="mt-7.5 normal-case"
disabled={
!active ||
!isValidNumber ||
Expand Down

0 comments on commit 1cb50f2

Please sign in to comment.