@rileybathurst/paddle 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Select.stories.tsx +18 -0
- package/src/Select.tsx +23 -0
- package/src/paddle-pricing-chart.tsx +1 -4
- package/src/styles/typography.css +23 -8
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { Select } from './Select';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
component: Select,
|
|
7
|
+
title: 'Atoms/Select',
|
|
8
|
+
args: {},
|
|
9
|
+
} satisfies Meta<typeof Select>;
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
|
|
14
|
+
export const Primary: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
primary: true,
|
|
17
|
+
},
|
|
18
|
+
};
|
package/src/Select.tsx
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
|
|
5
|
+
export const Select = () => {
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<select
|
|
9
|
+
className="comparesheet_select"
|
|
10
|
+
name={faker.commerce.productName()}
|
|
11
|
+
aria-label="Select a product"
|
|
12
|
+
>
|
|
13
|
+
{Array.from({ length: faker.number.int({ min: 1, max: 10 }) }).map(() => (
|
|
14
|
+
<option
|
|
15
|
+
key={faker.string.uuid()}
|
|
16
|
+
value={faker.commerce.productName()}
|
|
17
|
+
>
|
|
18
|
+
{faker.commerce.productName()}
|
|
19
|
+
</option>
|
|
20
|
+
))}
|
|
21
|
+
</select>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -10,9 +10,7 @@ const LineBreaker = ({ text }: { text: string; }) => {
|
|
|
10
10
|
// console.log(newStr);
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
|
-
<h4
|
|
14
|
-
<SVG src={newStr} />
|
|
15
|
-
</h4>
|
|
13
|
+
<h4 dangerouslySetInnerHTML={{ __html: newStr }} />
|
|
16
14
|
);
|
|
17
15
|
}
|
|
18
16
|
|
|
@@ -30,7 +28,6 @@ export const PaddlePricingChart = ({ rentalRates, rentalAddons, book, peek_base,
|
|
|
30
28
|
|
|
31
29
|
{rentalRates.nodes.map((rate) => (
|
|
32
30
|
<div key={rate.id} className="row">
|
|
33
|
-
{/* <h4>{rate.item}</h4> */}
|
|
34
31
|
<LineBreaker text={rate.item} />
|
|
35
32
|
<p>{rate.oneHour}</p>
|
|
36
33
|
<p>{rate.threeHour}</p>
|
|
@@ -198,20 +198,35 @@ hgroup {
|
|
|
198
198
|
line-height: 1.5;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
/*------------------------------------*/
|
|
202
|
+
|
|
201
203
|
select {
|
|
202
204
|
font-size: var(--vinson);
|
|
203
205
|
font-family: var(--body_font);
|
|
204
206
|
margin-block-end: 0;
|
|
205
|
-
/* A reset of styles, including removing the default dropdown arrow */
|
|
206
|
-
appearance: none;
|
|
207
|
-
/* Additional resets for further consistency */
|
|
208
|
-
background-color: transparent;
|
|
209
|
-
border: none;
|
|
210
|
-
padding: 0 var(--vinson) 0 0;
|
|
211
207
|
margin: 0;
|
|
212
|
-
width: 100%;
|
|
213
208
|
cursor: inherit;
|
|
214
209
|
line-height: inherit;
|
|
210
|
+
padding: var(--kosciuszko);
|
|
211
|
+
border: 1px solid var(--neutral-100);
|
|
212
|
+
background-color: var(--neutral-200);
|
|
213
|
+
|
|
214
|
+
@media (prefers-color-scheme: dark) {
|
|
215
|
+
border-color: var(--neutral-700);
|
|
216
|
+
background-color: var(--neutral-600);
|
|
217
|
+
color: var(--neutral-200);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@media (prefers-color-scheme: light) {
|
|
222
|
+
.tahoe-city select {
|
|
223
|
+
border-color: var(--sand-200);
|
|
224
|
+
background-color: var(--sand-100);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.comparesheet_select {
|
|
229
|
+
width: 100%;
|
|
215
230
|
}
|
|
216
231
|
|
|
217
232
|
/*------------------*/
|
|
@@ -238,4 +253,4 @@ select {
|
|
|
238
253
|
color: hsl(var(--sand__base), var(--dark));
|
|
239
254
|
}
|
|
240
255
|
}
|
|
241
|
-
*/
|
|
256
|
+
*/
|