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

Reflect color scheme based on design #476

Merged
merged 1 commit into from
Dec 15, 2023
Merged
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
2 changes: 1 addition & 1 deletion apps/website/src/components/ActionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function ActionCard({ title, description, buttonText, buttonUrl }
href={buttonUrl}
isExternal
variant="buttonlink"
bg="semaphore"
bgGradient="semaphore"
w="fit-content"
lineHeight="24px"
fontSize={{ base: "14px", md: "18px", lg: "20px" }}
Expand Down
5 changes: 1 addition & 4 deletions apps/website/src/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ export default function CodekBlock({ text }: CodekBlockProps) {
<Flex flex="1" overflow="auto" position="relative" borderRadius="8px" backgroundColor="darkBlue">
<CodeBlock {...copyBlockProps} />
<Button
textColor="alabaster.300"
variant="outline"
fontSize={{ base: "16px", md: "18px" }}
fontWeight="400"
borderColor="alabaster.800"
backgroundColor="darkBlue"
padding="5px 8px"
border="1px"
borderRadius="4px"
Expand Down
3 changes: 0 additions & 3 deletions apps/website/src/components/ProjectsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export default function ProjectsList(props: any) {
size="lg"
leftIcon={<IconPSE />}
variant={onlyPSE === true ? "solid" : "outline"}
colorScheme={onlyPSE === true ? "primary" : "inherit"}
onClick={() => setOnlyPSE(onlyPSE === true ? null : true)}
>
PSE
Expand All @@ -67,7 +66,6 @@ export default function ProjectsList(props: any) {
size="lg"
leftIcon={<IconCommunity />}
variant={onlyPSE === false ? "solid" : "outline"}
colorScheme={onlyPSE === false ? "primary" : "inherit"}
onClick={() => setOnlyPSE(onlyPSE === false ? null : false)}
>
Community
Expand All @@ -83,7 +81,6 @@ export default function ProjectsList(props: any) {
key={category}
size="sm"
variant={selectedCategories.includes(category) ? "solid" : "outline"}
colorScheme={selectedCategories.includes(category) ? "primary" : "inherit"}
onClick={() => {
const newCategories = selectedCategories.includes(category)
? selectedCategories.filter((c) => c !== category)
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/components/ToolsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ export default function ToolsCard({ icon, title, subtitle, details, url }: Tools
py="10px"
mt="24px"
w="full"
bg="semaphore"
bgGradient="semaphore"
color="white"
fontSize="18px"
_hover={{ bg: "semaphore", opacity: "85%" }}
_hover={{ bgGradient: "semaphore", opacity: "85%" }}
>
Select tool
</Link>
Expand Down
5 changes: 1 addition & 4 deletions apps/website/src/styles/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ const colors = {
darkBlue: "#0E101B",
darkBlueBg: "#00020D",
ceruleanBlue: "#3555DF",
// TODO: This can be replaced by using the 'bgGradient' Chakra property.
// and the existing primary color scheme.
// The value is: "linear(to-r, primary.500, primary.800)"
semaphore: "linear-gradient(92.32deg, #4771EA -33.31%, #2735A6 112.52%)",
semaphore: "linear(to-r, primary.500, primary.800)",
alabaster: {
300: "#B8B9C1",
400: "#92939E",
Expand Down
45 changes: 21 additions & 24 deletions apps/website/src/styles/components/Button.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { StyleFunctionProps, SystemStyleObject } from "@chakra-ui/theme-tools"
import { font } from "../styles"
import colors from "../colors"

const Button = {
baseStyle: {
Expand All @@ -13,42 +14,38 @@ const Button = {
paddingRight: "18px !important"
},
defaultProps: {
colorScheme: "white"
colorScheme: "#FFFFFF"
},
variants: {
solid: (props: StyleFunctionProps): SystemStyleObject => {
const { colorScheme: c } = props

if (c === "primary") {
// const bgGradient = "linear(to-r, primary.500, primary.800)"
const bg = `${c}.500`
const color = "white"

return {
bg,
color,
_hover: {
bg: `${c}.800`,
_disabled: {
bg
}
},
_active: { bg: `${c}.800` }
return {
bg: c,
color: colors.darkBlueBg,
_hover: {
color: c,
bgGradient: colors.semaphore,
_disabled: {
bg: c
}
}
}

const bg = c
},
outline: (props: StyleFunctionProps): SystemStyleObject => {
const { colorScheme: c } = props

return {
bg,
color: `darkBlue`,
color: c,
border: `1.2px solid ${c}`,
_hover: {
bg: `${c}.300`,
bg: colors.darkBlueBg,
color: c,
border: `1.2px solid ${colors.primary["600"]}`,
_disabled: {
bg
bg: c
}
},
_active: { bg: `${c}.400` }
}
}
}
}
Expand Down
Loading