Skip to content

Commit 46dd76c

Browse files
committed
feat(modal): use gray tokens
1 parent 9b2adaa commit 46dd76c

File tree

6 files changed

+31
-1
lines changed

6 files changed

+31
-1
lines changed

core/src/components/modal/modal.native.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
width: 36px;
4242
height: 5px;
4343

44-
background: var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));
44+
background: var(--ion-components-ion-modal-handle-bg);
4545

4646
&::before {
4747
/**

core/src/themes/ios/dark.tokens.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export const darkTheme: DarkTheme = {
7272
background: 'var(--ion-background-color-step-100)',
7373
toolbarBackground: 'var(--ion-background-color-step-150)',
7474
toolbarBorderColor: 'var(--ion-background-color-step-250)',
75+
handleBg: colors.gray['350']!,
7576
},
7677
IonDatetime: {
7778
bg: colors.gray['950']!,

core/src/themes/ios/light.tokens.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ export const lightTheme: LightTheme = {
2727
IonItem: {
2828
paragraphTextColor: '#a3a3a3',
2929
},
30+
IonModal: {
31+
handleBg: '#c0c0be',
32+
},
3033
},
3134
};

core/src/themes/md/dark.tokens.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,8 @@ export const darkTheme: DarkTheme = {
9393
IonDatetimeButton: {
9494
bg: colors.gray['300']!,
9595
},
96+
IonModal: {
97+
handleBg: colors.gray['350']!,
98+
},
9699
},
97100
};

core/src/themes/md/light.tokens.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ export const lightTheme: LightTheme = {
1717
colorFocused: '#35404e', // Available only in md
1818
separatorColor: '#73849a',
1919
},
20+
IonModal: {
21+
handleBg: '#c0c0be',
22+
},
2023
},
2124
};

core/src/themes/native/test/steps/index.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,27 @@
219219
<div class="block text-step-850">Step 850</div>
220220
<div class="block text-step-900">Step 900</div>
221221
<div class="block text-step-950">Step 950</div>
222+
223+
<h2>Gray</h2>
224+
<div id="gray"></div>
222225
</ion-content>
223226
</ion-app>
227+
228+
<script>
229+
// create gray color steps dynamically using the CSS variables
230+
// like --ion-color-step-50, --ion-color-step-100, etc.
231+
const grayContainer = document.getElementById('gray');
232+
for (let i = 50; i <= 950; i += 50) {
233+
// i want it to have a block showing the color gray step
234+
// then the text "Gray {i}"
235+
// then the value of the CSS variable --ion-color-gray-{i}
236+
const block = document.createElement('div');
237+
block.classList.add('block');
238+
block.style.backgroundColor = `var(--ion-color-gray-${i})`;
239+
block.style.color = `var(--ion-color-gray-${950 - i})`;
240+
block.textContent = `Gray ${i} - var(--ion-color-gray-${i})`;
241+
grayContainer.appendChild(block);
242+
}
243+
</script>
224244
</body>
225245
</html>

0 commit comments

Comments
 (0)