Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
f1cf55c1
Commit
f1cf55c1
authored
Sep 11, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoupled text variants
parent
1c6e7611
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
51 deletions
+49
-51
Theme.tsx
src/themes/Theme.tsx
+2
-46
Variants.tsx
src/themes/Variants.tsx
+0
-5
textVariants.ts
src/themes/variants/textVariants.ts
+47
-0
No files found.
src/themes/Theme.tsx
View file @
f1cf55c1
import
{
createTheme
}
from
"@shopify/restyle"
;
import
{
createTheme
}
from
"@shopify/restyle"
;
import
{
buttonVariants
}
from
"./variants/buttonVariants"
;
import
{
buttonVariants
}
from
"./variants/buttonVariants"
;
import
{
cardVariants
}
from
"./variants/cardVariants"
;
import
{
cardVariants
}
from
"./variants/cardVariants"
;
import
{
textVariants
}
from
"./variants/textVariants"
;
const
palette
=
{
const
palette
=
{
purpleLight
:
"#8C6FF7"
,
purpleLight
:
"#8C6FF7"
,
...
@@ -61,52 +62,7 @@ const theme = createTheme({
...
@@ -61,52 +62,7 @@ const theme = createTheme({
phone
:
0
,
phone
:
0
,
tablet
:
768
,
tablet
:
768
,
},
},
textVariants
:
{
textVariants
,
defaults
:
{
// We can define a default text variant here.
color
:
"gray"
,
},
header
:
{
fontWeight
:
"bold"
,
fontSize
:
34
,
},
body
:
{
fontSize
:
16
,
lineHeight
:
24
,
},
primary
:
{
color
:
"primary"
,
},
secondary
:
{
color
:
"secondary"
,
},
black
:
{
color
:
"black"
,
},
white
:
{
color
:
"white"
,
},
gray
:
{
color
:
"gray"
,
},
lightGray
:
{
color
:
"lightGray"
,
},
error
:
{
color
:
"red"
,
},
softRed
:
{
color
:
"softRed"
,
},
yellow
:
{
color
:
"softYellow"
,
},
softYellow
:
{
color
:
"softYellow"
,
},
},
cardVariants
,
cardVariants
,
buttonVariants
,
buttonVariants
,
});
});
...
...
src/themes/Variants.tsx
View file @
f1cf55c1
...
@@ -11,9 +11,4 @@ export const buttonVariants = createVariant<Theme, "buttonVariants">({
...
@@ -11,9 +11,4 @@ export const buttonVariants = createVariant<Theme, "buttonVariants">({
export
const
textVariants
=
createVariant
<
Theme
,
"textVariants"
>
({
export
const
textVariants
=
createVariant
<
Theme
,
"textVariants"
>
({
themeKey
:
"textVariants"
,
themeKey
:
"textVariants"
,
defaults
:
{
fontSize
:
16
,
fontWeight
:
"normal"
,
color
:
"gray"
,
},
});
});
src/themes/variants/textVariants.ts
0 → 100644
View file @
f1cf55c1
export
const
textVariants
=
{
defaults
:
{
// fontSize: 16,
// fontWeight: "normal",
color
:
"gray"
,
},
header
:
{
fontWeight
:
"bold"
,
fontSize
:
34
,
},
body
:
{
fontSize
:
16
,
lineHeight
:
24
,
},
primary
:
{
color
:
"primary"
,
},
secondary
:
{
color
:
"secondary"
,
},
black
:
{
color
:
"black"
,
},
white
:
{
color
:
"white"
,
},
gray
:
{
color
:
"gray"
,
},
lightGray
:
{
color
:
"lightGray"
,
},
error
:
{
color
:
"red"
,
},
softRed
:
{
color
:
"softRed"
,
},
yellow
:
{
color
:
"softYellow"
,
},
softYellow
:
{
color
:
"softYellow"
,
},
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment