Skip to content

Commit

Permalink
co-locate component shadows to avatar.json5 and button.json5 (#1185)
Browse files Browse the repository at this point in the history
* co-locate avatar shadow

* add button shadows to button.json5
  • Loading branch information
lukasoppermann authored Feb 6, 2025
1 parent fa5426c commit dbee210
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 232 deletions.
33 changes: 33 additions & 0 deletions src/tokens/component/avatar.json5
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,38 @@
},
},
},
shadow: {
$value: [
{
color: '{base.color.neutral.0}',
alpha: 0.8,
offsetX: '0px',
offsetY: '0px',
blur: '0px',
spread: '2px',
},
],
$type: 'shadow',
$extensions: {
'org.primer.figma': {
collection: 'mode',
group: 'component shadow',
},
'org.primer.overrides': {
dark: {
$value: [
{
color: '{base.color.neutral.1}',
alpha: 1,
offsetX: '0px',
offsetY: '0px',
blur: '0px',
spread: '2px',
},
],
},
},
},
},
},
}
187 changes: 187 additions & 0 deletions src/tokens/component/button.json5
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,43 @@
},
},
},
},
shadow: {
resting: {
$value: [
{
color: '{base.color.neutral.13}',
alpha: 0.04,
offsetX: '0px',
offsetY: '1px',
blur: '0px',
spread: '0px',
inset: false,
},
],
$type: 'shadow',
$extensions: {
'org.primer.figma': {
collection: 'mode',
group: 'component shadow',
},
'org.primer.overrides': {
dark: {
$value: [
{
color: '{base.color.transparent}',
alpha: 0,
offsetX: '0px',
offsetY: '0px',
blur: '0px',
spread: '0px',
inset: false,
},
],
},
},
},
},
},
},
primary: {
Expand Down Expand Up @@ -441,6 +478,69 @@
},
},
},
},
shadow: {
selected: {
$value: [
{
color: '{base.color.green.9}',
alpha: 0.3,
offsetX: '0px',
offsetY: '1px',
blur: '0px',
spread: '0px',
inset: true,
},
],
$type: 'shadow',
$extensions: {
'org.primer.figma': {
collection: 'mode',
group: 'component shadow',
},
'org.primer.overrides': {
'light-tritanopia': {
$value: [
{
color: '{base.color.blue.9}',
alpha: 0.3,
offsetX: '0px',
offsetY: '1px',
blur: '0px',
spread: '0px',
inset: true,
},
],
},
'light-protanopia-deuteranopia': {
$value: [
{
color: '{base.color.blue.9}',
alpha: 0.3,
offsetX: '0px',
offsetY: '1px',
blur: '0px',
spread: '0px',
inset: true,
},
],
},
dark: {
$value: [
{
color: '{base.color.transparent}',
alpha: 0,
offsetX: '0px',
offsetY: '0px',
blur: '0px',
spread: '0px',
inset: false,
},
],
},
},
},
},
},
},
invisible: {
Expand Down Expand Up @@ -881,6 +981,43 @@
},
},
},
},
shadow: {
selected: {
$value: [
{
color: '{base.color.blue.9}',
alpha: 0.2,
offsetX: '0px',
offsetY: '1px',
blur: '0px',
spread: '0px',
inset: true,
},
],
$type: 'shadow',
$extensions: {
'org.primer.figma': {
collection: 'mode',
group: 'component shadow',
},
'org.primer.overrides': {
dark: {
$value: [
{
color: '{base.color.transparent}',
alpha: 0,
offsetX: '0px',
offsetY: '0px',
blur: '0px',
spread: '0px',
inset: false,
},
],
},
},
},
},
},
},
danger: {
Expand Down Expand Up @@ -1151,6 +1288,56 @@
},
},
},
},
shadow: {
selected: {
$value: [
{
color: '{base.color.red.9}',
alpha: 0.2,
offsetX: '0px',
offsetY: '1px',
blur: '0px',
spread: '0px',
inset: true,
},
],
$type: 'shadow',
$extensions: {
'org.primer.figma': {
collection: 'mode',
group: 'component shadow',
},
'org.primer.overrides': {
'light-protanopia-deuteranopia': {
$value: [
{
color: '{base.color.orange.9}',
alpha: 0.2,
offsetX: '0px',
offsetY: '1px',
blur: '0px',
spread: '0px',
inset: true,
},
],
},
dark: {
$value: [
{
color: '{base.color.transparent}',
alpha: 0,
offsetX: '0px',
offsetY: '0px',
blur: '0px',
spread: '0px',
inset: false,
},
],
},
},
},
},
},
},
inactive: {
Expand Down
Loading

0 comments on commit dbee210

Please sign in to comment.