Skip to content

Commit 24736a1

Browse files
committed
make table bg color dynamic as per theme
1 parent 5b4850a commit 24736a1

File tree

1 file changed

+22
-15
lines changed
  • src/sections/Projects/Sistent/components/backdrop

1 file changed

+22
-15
lines changed

src/sections/Projects/Sistent/components/backdrop/guidance.js

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ import { navigate } from "gatsby";
33
import { useLocation } from "@reach/router";
44
import { SistentLayout } from "../../sistent-layout";
55
import TabButton from "../../../../../reusecore/Button";
6+
import styled from "styled-components";
7+
8+
const StyledTable = styled.table`
9+
tr {
10+
background-color:${props => props.theme.grey121212ToWhite};
11+
}
12+
`;
613

714
const BackdropGuidance = () => {
815
const location = useLocation();
@@ -89,17 +96,17 @@ const BackdropGuidance = () => {
8996
</a>
9097
<p>Props of the Fade component are also available.</p>
9198

92-
<table>
99+
<StyledTable>
93100
<thead>
94-
<tr style={{ backgroundColor: "#121212" }}>
101+
<tr>
95102
<th>Name</th>
96103
<th>Type</th>
97104
<th>Default</th>
98105
<th>Description</th>
99106
</tr>
100107
</thead>
101108
<tbody>
102-
<tr style={{ backgroundColor: "#121212" }}>
109+
<tr>
103110
<td>
104111
<code>open*</code>
105112
</td>
@@ -111,7 +118,7 @@ const BackdropGuidance = () => {
111118
If <code>true</code>, the component is shown.
112119
</td>
113120
</tr>
114-
<tr style={{ backgroundColor: "#121212" }}>
121+
<tr>
115122
<td>
116123
<code>children</code>
117124
</td>
@@ -121,7 +128,7 @@ const BackdropGuidance = () => {
121128
<td>-</td>
122129
<td>The content of the component.</td>
123130
</tr>
124-
<tr style={{ backgroundColor: "#121212" }}>
131+
<tr>
125132
<td>
126133
<code>classes</code>
127134
</td>
@@ -134,7 +141,7 @@ const BackdropGuidance = () => {
134141
CSS classes API below for more details.
135142
</td>
136143
</tr>
137-
<tr style={{ backgroundColor: "#121212" }}>
144+
<tr>
138145
<td>
139146
<code>component</code>
140147
</td>
@@ -147,7 +154,7 @@ const BackdropGuidance = () => {
147154
an HTML element or a component.
148155
</td>
149156
</tr>
150-
<tr style={{ backgroundColor: "#121212" }}>
157+
<tr>
151158
<td>
152159
<code>components</code>
153160
</td>
@@ -164,7 +171,7 @@ const BackdropGuidance = () => {
164171
deprecated APIs for more details.
165172
</td>
166173
</tr>
167-
<tr style={{ backgroundColor: "#121212" }}>
174+
<tr>
168175
<td>
169176
<code>componentsProps</code>
170177
</td>
@@ -181,7 +188,7 @@ const BackdropGuidance = () => {
181188
prop instead. This prop will be removed in v7.
182189
</td>
183190
</tr>
184-
<tr style={{ backgroundColor: "#121212" }}>
191+
<tr>
185192
<td>
186193
<code>invisible</code>
187194
</td>
@@ -196,7 +203,7 @@ const BackdropGuidance = () => {
196203
popovers or custom selects.
197204
</td>
198205
</tr>
199-
<tr style={{ backgroundColor: "#121212" }}>
206+
<tr>
200207
<td>
201208
<code>slotProps</code>
202209
</td>
@@ -208,7 +215,7 @@ const BackdropGuidance = () => {
208215
</td>
209216
<td>The props used for each slot inside the component.</td>
210217
</tr>
211-
<tr style={{ backgroundColor: "#121212" }}>
218+
<tr>
212219
<td>
213220
<code>slots</code>
214221
</td>
@@ -220,7 +227,7 @@ const BackdropGuidance = () => {
220227
</td>
221228
<td>The components used for each slot inside.</td>
222229
</tr>
223-
<tr style={{ backgroundColor: "#121212" }}>
230+
<tr>
224231
<td>
225232
<code>sx</code>
226233
</td>
@@ -235,7 +242,7 @@ const BackdropGuidance = () => {
235242
details.
236243
</td>
237244
</tr>
238-
<tr style={{ backgroundColor: "#121212" }}>
245+
<tr>
239246
<td>
240247
<code>TransitionComponent</code>
241248
</td>
@@ -250,7 +257,7 @@ const BackdropGuidance = () => {
250257
component requirements.
251258
</td>
252259
</tr>
253-
<tr style={{ backgroundColor: "#121212" }}>
260+
<tr>
254261
<td>
255262
<code>transitionDuration</code>
256263
</td>
@@ -266,7 +273,7 @@ const BackdropGuidance = () => {
266273
</td>
267274
</tr>
268275
</tbody>
269-
</table>
276+
</StyledTable>
270277

271278
<a id="Labeling">
272279
<h2>Labeling</h2>

0 commit comments

Comments
 (0)