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

Pagination buttons styles #1009

Open
wants to merge 3 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
6 changes: 5 additions & 1 deletion src/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,11 @@ export const colors = {
dark: colorsBase.gray.normal,
},
org_text_secondary: colorsBase.gray.normal,

page_button: {
active: '#cce5de',
light: colorsBase.white.dark,
dark: colorsBase.blue.dark,
},
process: {
aside: {
bg: colorsBase.gradient,
Expand Down
25 changes: 24 additions & 1 deletion src/theme/components/pagination.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createMultiStyleConfigHelpers } from '@chakra-ui/react'
import { createMultiStyleConfigHelpers, defineStyle, defineStyleConfig } from '@chakra-ui/react'
import { PaginationAnatomy } from '@vocdoni/chakra-components'

const { defineMultiStyleConfig: defineVoteWeightTipStyle, definePartsStyle: defineVoteWeightParts } =
Expand All @@ -19,3 +19,26 @@ export const Pagination = defineVoteWeightTipStyle({
totalResults: {},
}),
})

const pageButtonBaseStyle = {
bgColor: 'transparent !important',
color: 'black',
borderColor: 'black',

_hover: {
color: 'black',
bgColor: 'page_button.light !important',
},

_dark: {
color: 'black',
},

_active: {
bgColor: 'page_button.active !important',
},
}

export const PageButton = defineStyleConfig({
baseStyle: pageButtonBaseStyle,
})
3 changes: 2 additions & 1 deletion src/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ElectionTitle, Heading } from './components/heading'
import { Input } from './components/input'
import { Link } from './components/link'
import { Modal } from './components/modal'
import { Pagination } from './components/pagination'
import { PageButton, Pagination } from './components/pagination'
import { ElectionQuestions } from './components/Questions'
import { Radio } from './components/radio'
import { ElectionResults } from './components/results'
Expand Down Expand Up @@ -104,6 +104,7 @@ export const theme = extendTheme(vtheme, {
Link,
Menu,
Modal,
PageButton,
Pagination,
Radio,
Stepper,
Expand Down