app-studio 0.4.6 → 0.5.0
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/README.md +423 -111
- package/dist/app-studio.cjs.development.js +133 -79
- package/dist/app-studio.cjs.development.js.map +1 -1
- package/dist/app-studio.cjs.production.min.js +1 -1
- package/dist/app-studio.esm.js +133 -79
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/app-studio.umd.development.js +133 -79
- package/dist/app-studio.umd.development.js.map +1 -1
- package/dist/app-studio.umd.production.min.js +1 -1
- package/dist/components/Animation.d.ts +39 -39
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/cssClass.d.ts +25 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,94 +1,218 @@
|
|
|
1
|
-
# App
|
|
1
|
+
# App-Studio Documentation
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
- [App-Studio Documentation](#app-studio-documentation)
|
|
5
|
+
- [Table of Contents](#table-of-contents)
|
|
6
|
+
- [1. Introduction](#1-introduction)
|
|
7
|
+
- [Features](#features)
|
|
8
|
+
- [2. Installation](#2-installation)
|
|
9
|
+
- [3. Core Components](#3-core-components)
|
|
10
|
+
- [Element](#element)
|
|
11
|
+
- [Usage](#usage)
|
|
12
|
+
- [Key Properties](#key-properties)
|
|
13
|
+
- [View](#view)
|
|
14
|
+
- [Usage](#usage-1)
|
|
15
|
+
- [Text](#text)
|
|
16
|
+
- [Usage](#usage-2)
|
|
17
|
+
- [Form](#form)
|
|
18
|
+
- [Usage](#usage-3)
|
|
19
|
+
- [Image](#image)
|
|
20
|
+
- [Usage](#usage-4)
|
|
21
|
+
- [4. Responsive Design](#4-responsive-design)
|
|
22
|
+
- [Media Prop](#media-prop)
|
|
23
|
+
- [Example](#example)
|
|
24
|
+
- [useResponsive Hook](#useresponsive-hook)
|
|
25
|
+
- [Example](#example-1)
|
|
26
|
+
- [5. Event Management](#5-event-management)
|
|
27
|
+
- [Example](#example-2)
|
|
28
|
+
- [6. Theming](#6-theming)
|
|
29
|
+
- [Setting up the Theme](#setting-up-the-theme)
|
|
30
|
+
- [Using ThemeProvider](#using-themeprovider)
|
|
31
|
+
- [Applying Theme in Components](#applying-theme-in-components)
|
|
32
|
+
- [7. Custom Hooks](#7-custom-hooks)
|
|
33
|
+
- [useMount](#usemount)
|
|
34
|
+
- [Usage](#usage-5)
|
|
35
|
+
- [8. Design Props](#8-design-props)
|
|
36
|
+
- [Example](#example-3)
|
|
37
|
+
- [Shadow Prop](#shadow-prop)
|
|
38
|
+
- [9. Animations](#9-animations)
|
|
39
|
+
- [Basic Usage](#basic-usage)
|
|
40
|
+
- [Available Animations](#available-animations)
|
|
41
|
+
- [Customizing Animations](#customizing-animations)
|
|
42
|
+
- [Creating Custom Animations](#creating-custom-animations)
|
|
43
|
+
- [Combining Animations](#combining-animations)
|
|
44
|
+
- [Animation Events](#animation-events)
|
|
45
|
+
- [10. Advanced Usage](#10-advanced-usage)
|
|
46
|
+
- [10. Contributing](#10-contributing)
|
|
47
|
+
- [11. License](#11-license)
|
|
48
|
+
|
|
49
|
+
## 1. Introduction
|
|
50
|
+
|
|
51
|
+
App-Studio is a powerful React-based library designed to simplify the process of building responsive, interactive, and visually consistent web applications. It provides CSS design props for layout, spacing, sizing, shadows, event management, and theming.
|
|
52
|
+
|
|
53
|
+
### Features
|
|
54
|
+
|
|
55
|
+
- 🌈 Add styled props to your application
|
|
56
|
+
- 📦 A set of simple and powerful React components
|
|
57
|
+
- 🌍 Internationalization support for dozens of languages
|
|
58
|
+
- 🎨 Powerful theme customization in every detail
|
|
59
|
+
|
|
60
|
+
## 2. Installation
|
|
61
|
+
|
|
62
|
+
To install App-Studio, run the following command:
|
|
2
63
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[](https://github.com/prettier/prettier)
|
|
64
|
+
```bash
|
|
65
|
+
npm install app-studio --save
|
|
66
|
+
```
|
|
7
67
|
|
|
68
|
+
## 3. Core Components
|
|
8
69
|
|
|
9
|
-
|
|
10
|
-
[npm-url]: http://npmjs.org/package/app-studio
|
|
11
|
-
[github-action-image]: https://github.com/rize-network/app-studio/workflows/%E2%9C%85%20test/badge.svg
|
|
12
|
-
[github-action-url]: https://github.com/rize-network/app-studio/actions?query=workflow%3A%22%E2%9C%85+test%22
|
|
70
|
+
### Element
|
|
13
71
|
|
|
14
|
-
|
|
15
|
-
[download-url]: https://npmjs.org/package/app-studio
|
|
72
|
+
The `Element` component is the foundation of App-Studio. It handles a large part of the styling for other components, including responsiveness, shadow, margins, and padding.
|
|
16
73
|
|
|
17
|
-
|
|
18
|
-
|
|
74
|
+
#### Usage
|
|
75
|
+
|
|
76
|
+
```jsx
|
|
77
|
+
<Element backgroundColor="color.blue" padding={10}>
|
|
78
|
+
This is an element
|
|
79
|
+
</Element>
|
|
80
|
+
```
|
|
19
81
|
|
|
20
|
-
|
|
21
|
-
[discussions-url]: https://github.com/rize-network/app-studio/discussions
|
|
82
|
+
#### Key Properties
|
|
22
83
|
|
|
23
|
-
|
|
24
|
-
|
|
84
|
+
- `size`: Sets equal width and height
|
|
85
|
+
- `on`: Defines styles for different CSS events
|
|
86
|
+
- `media`: Defines styles for different media queries
|
|
87
|
+
- `shadow`: Adds shadow to an element (boolean, number, or `Shadow` object)
|
|
25
88
|
|
|
89
|
+
### View
|
|
26
90
|
|
|
91
|
+
The `View` component is a versatile layout component that extends the basic HTML `div` tag with additional styling properties.
|
|
27
92
|
|
|
28
|
-
|
|
93
|
+
#### Usage
|
|
29
94
|
|
|
30
|
-
|
|
95
|
+
```jsx
|
|
96
|
+
<View backgroundColor="color.red" color="color.white" padding={20}>
|
|
97
|
+
This is a view
|
|
98
|
+
</View>
|
|
99
|
+
```
|
|
31
100
|
|
|
32
|
-
|
|
101
|
+
### Text
|
|
33
102
|
|
|
34
|
-
|
|
35
|
-
- 📦 A set of Simple and powerful React components.
|
|
36
|
-
- 🌍 Internationalization support for dozens of languages.
|
|
37
|
-
- 🎨 Powerful theme customization in every detail.
|
|
103
|
+
The `Text` component extends the HTML `div` tag with additional text styling properties.
|
|
38
104
|
|
|
39
|
-
|
|
105
|
+
#### Usage
|
|
40
106
|
|
|
41
|
-
```
|
|
42
|
-
|
|
107
|
+
```jsx
|
|
108
|
+
<Text color="color.blue">This is a text</Text>
|
|
43
109
|
```
|
|
44
110
|
|
|
45
|
-
|
|
111
|
+
### Form
|
|
46
112
|
|
|
47
|
-
The
|
|
113
|
+
The `Form` component extends the HTML `form` tag and provides `Button` and `Input` subcomponents.
|
|
48
114
|
|
|
49
|
-
|
|
115
|
+
#### Usage
|
|
50
116
|
|
|
51
117
|
```jsx
|
|
52
|
-
|
|
53
|
-
|
|
118
|
+
<Form>
|
|
119
|
+
<Input placeholder="Enter your name" />
|
|
120
|
+
<Button>Submit</Button>
|
|
121
|
+
</Form>
|
|
122
|
+
```
|
|
54
123
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
124
|
+
### Image
|
|
125
|
+
|
|
126
|
+
The `Image` component extends the HTML `img` tag with additional properties like `shadow`, `media`, and `on`.
|
|
127
|
+
|
|
128
|
+
#### Usage
|
|
129
|
+
|
|
130
|
+
```jsx
|
|
131
|
+
<Image src="url_to_image" alt="description" />
|
|
64
132
|
```
|
|
65
133
|
|
|
66
|
-
|
|
134
|
+
## 4. Responsive Design
|
|
135
|
+
|
|
136
|
+
App-Studio offers two primary methods for implementing responsive design: the `media` prop and the `useResponsive` hook.
|
|
137
|
+
|
|
138
|
+
### Media Prop
|
|
139
|
+
|
|
140
|
+
The `media` prop allows you to specify different styles for various devices or screen sizes without causing component re-renders.
|
|
141
|
+
|
|
142
|
+
#### Example
|
|
67
143
|
|
|
68
144
|
```jsx
|
|
69
|
-
|
|
70
|
-
|
|
145
|
+
<View size={100}
|
|
146
|
+
media={{
|
|
147
|
+
mobile: { backgroundColor: 'color.green' },
|
|
148
|
+
tablet: { backgroundColor: 'color.yellow' },
|
|
149
|
+
xl: { backgroundColor: 'color.blue' },
|
|
150
|
+
}}
|
|
151
|
+
/>
|
|
152
|
+
```
|
|
71
153
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
154
|
+
### useResponsive Hook
|
|
155
|
+
|
|
156
|
+
The `useResponsive` hook provides information about the current screen size and device type based on defined breakpoints and devices.
|
|
157
|
+
|
|
158
|
+
#### Example
|
|
159
|
+
|
|
160
|
+
```jsx
|
|
161
|
+
const { screen, on } = useResponsive();
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<View size={100} backgroundColor={responsive[screen]}>
|
|
165
|
+
{screen} - mobile: {on('mobile') ? 'yes' : 'no'}
|
|
166
|
+
</View>
|
|
167
|
+
);
|
|
83
168
|
```
|
|
84
169
|
|
|
85
|
-
|
|
170
|
+
To use these responsive features, wrap your app with `ResponsiveProvider`:
|
|
86
171
|
|
|
87
|
-
|
|
172
|
+
```jsx
|
|
173
|
+
<ResponsiveProvider
|
|
174
|
+
breakpoints={{
|
|
175
|
+
xs: 0,
|
|
176
|
+
sm: 340,
|
|
177
|
+
md: 560,
|
|
178
|
+
lg: 1080,
|
|
179
|
+
xl: 1300,
|
|
180
|
+
}}
|
|
181
|
+
devices={{
|
|
182
|
+
mobile: ['xs', 'sm'],
|
|
183
|
+
tablet: ['md', 'lg'],
|
|
184
|
+
desktop: ['lg', 'xl']
|
|
185
|
+
}}
|
|
186
|
+
>
|
|
187
|
+
<App />
|
|
188
|
+
</ResponsiveProvider>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## 5. Event Management
|
|
192
|
+
|
|
193
|
+
App-Studio provides an intuitive way to manage CSS events through the `on` prop. This feature allows you to style elements based on various interactive states.
|
|
194
|
+
|
|
195
|
+
#### Example
|
|
88
196
|
|
|
89
197
|
```jsx
|
|
90
|
-
|
|
198
|
+
<View
|
|
199
|
+
backgroundColor="grey"
|
|
200
|
+
padding={20}
|
|
201
|
+
on={{ hover: { backgroundColor: 'blue.100' } }}
|
|
202
|
+
>
|
|
203
|
+
Hover over me
|
|
204
|
+
</View>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Supported events include `hover`, `active`, `focus`, and `disabled`.
|
|
208
|
+
|
|
209
|
+
## 6. Theming
|
|
91
210
|
|
|
211
|
+
App-Studio's theming system allows you to maintain a consistent look across your application using the `ThemeProvider` component.
|
|
212
|
+
|
|
213
|
+
#### Setting up the Theme
|
|
214
|
+
|
|
215
|
+
```javascript
|
|
92
216
|
const theme = {
|
|
93
217
|
main: { primary: '#fff7ed' },
|
|
94
218
|
components: { button: { background: '#fff7ed' } }
|
|
@@ -96,86 +220,274 @@ const theme = {
|
|
|
96
220
|
|
|
97
221
|
const colors = {
|
|
98
222
|
main: { blue: '#94a3b8' },
|
|
99
|
-
palette: {
|
|
223
|
+
palette: {
|
|
224
|
+
blueGray: {
|
|
225
|
+
50: '#f8fafc',
|
|
226
|
+
// ... other shades
|
|
227
|
+
900: '#0f172a'
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
#### Using ThemeProvider
|
|
234
|
+
|
|
235
|
+
```jsx
|
|
236
|
+
<ThemeProvider theme={theme} colors={colors}>
|
|
237
|
+
<App />
|
|
238
|
+
</ThemeProvider>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
#### Applying Theme in Components
|
|
242
|
+
|
|
243
|
+
```jsx
|
|
244
|
+
<View backgroundColor="color.blue">
|
|
245
|
+
<Text color="theme.primary">Hello</Text>
|
|
246
|
+
<Button backgroundColor="theme.button.background">Click me</Button>
|
|
247
|
+
</View>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## 7. Custom Hooks
|
|
251
|
+
|
|
252
|
+
### useMount
|
|
253
|
+
|
|
254
|
+
The `useMount` hook executes logic when a component first mounts.
|
|
255
|
+
|
|
256
|
+
#### Usage
|
|
257
|
+
|
|
258
|
+
```jsx
|
|
259
|
+
import { useMount } from '@your-org/app-studio';
|
|
260
|
+
|
|
261
|
+
const MyComponent = () => {
|
|
262
|
+
useMount(() => {
|
|
263
|
+
console.log('MyComponent mounted');
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
return <div>MyComponent</div>;
|
|
100
267
|
};
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## 8. Design Props
|
|
271
|
+
|
|
272
|
+
App-Studio provides additional props to better manage design integration in CSS. These props offer more control over the styling of components, including layout, spacing, and sizing.
|
|
273
|
+
|
|
274
|
+
### Example
|
|
275
|
+
|
|
276
|
+
```jsx
|
|
277
|
+
<View
|
|
278
|
+
backgroundColor="theme.primary"
|
|
279
|
+
padding={20}
|
|
280
|
+
margin={10}
|
|
281
|
+
width={200}
|
|
282
|
+
height={100}
|
|
283
|
+
>
|
|
284
|
+
I am a View component with custom styling
|
|
285
|
+
</View>
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Shadow Prop
|
|
289
|
+
|
|
290
|
+
The `shadow` prop is used to manage shadows in CSS. It takes a number or a string as a value, which defines the shadow effect to apply to the component.
|
|
291
|
+
|
|
292
|
+
```jsx
|
|
293
|
+
<View
|
|
294
|
+
backgroundColor="theme.primary"
|
|
295
|
+
padding={20}
|
|
296
|
+
shadow={6}
|
|
297
|
+
>
|
|
298
|
+
I have a shadow
|
|
299
|
+
</View>
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## 9. Animations
|
|
303
|
+
|
|
304
|
+
App-Studio provides a powerful and flexible animation system that allows you to easily add dynamic effects to your components. The animation system is based on CSS animations and can be applied using the `animate` prop.
|
|
305
|
+
|
|
306
|
+
### Basic Usage
|
|
307
|
+
|
|
308
|
+
To apply an animation to a component, use the `animate` prop with an animation object:
|
|
309
|
+
|
|
310
|
+
```jsx
|
|
311
|
+
import { View, Animation } from 'app-studio';
|
|
101
312
|
|
|
102
313
|
function Example() {
|
|
103
314
|
return (
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
padding: 20
|
|
112
|
-
}
|
|
113
|
-
}}
|
|
114
|
-
>
|
|
115
|
-
Base element
|
|
116
|
-
</Span>
|
|
117
|
-
<View
|
|
118
|
-
backgroundColor="theme.primary"
|
|
119
|
-
margin={10}
|
|
120
|
-
width={200}
|
|
121
|
-
on={{ hover: { backgroundColor: 'color.blueGray.500' } }}
|
|
122
|
-
>
|
|
123
|
-
Hover to change color
|
|
124
|
-
</View>
|
|
125
|
-
<Button backgroundColor="theme.button.background">Click here</Button>
|
|
126
|
-
<Text color="theme.primary">Hello</Text>
|
|
127
|
-
</ThemeProvider>
|
|
128
|
-
</ResponsiveProvider>
|
|
315
|
+
<View
|
|
316
|
+
animate={Animation.fadeIn()}
|
|
317
|
+
backgroundColor="theme.primary"
|
|
318
|
+
padding={20}
|
|
319
|
+
>
|
|
320
|
+
This view will fade in
|
|
321
|
+
</View>
|
|
129
322
|
);
|
|
130
323
|
}
|
|
131
324
|
```
|
|
132
325
|
|
|
133
|
-
|
|
326
|
+
### Available Animations
|
|
134
327
|
|
|
135
|
-
|
|
328
|
+
App-Studio comes with a set of pre-defined animations that you can use out of the box:
|
|
136
329
|
|
|
137
|
-
|
|
330
|
+
- `fadeIn` / `fadeOut`
|
|
331
|
+
- `slideInLeft` / `slideInRight` / `slideInUp` / `slideInDown`
|
|
332
|
+
- `zoomIn` / `zoomOut`
|
|
333
|
+
- `bounce`
|
|
334
|
+
- `rotate`
|
|
335
|
+
- `pulse`
|
|
336
|
+
- `flash`
|
|
337
|
+
- `shake`
|
|
338
|
+
- `swing`
|
|
339
|
+
- `rubberBand`
|
|
340
|
+
- `wobble`
|
|
341
|
+
- `flip`
|
|
342
|
+
- `heartBeat`
|
|
343
|
+
- `rollIn` / `rollOut`
|
|
344
|
+
- `lightSpeedIn` / `lightSpeedOut`
|
|
345
|
+
- `hinge`
|
|
346
|
+
- `jackInTheBox`
|
|
138
347
|
|
|
139
|
-
|
|
140
|
-
|
|
348
|
+
Each animation function accepts parameters to customize the duration, timing function, and other properties.
|
|
349
|
+
|
|
350
|
+
### Customizing Animations
|
|
351
|
+
|
|
352
|
+
You can customize animations by passing parameters to the animation functions:
|
|
353
|
+
|
|
354
|
+
```jsx
|
|
355
|
+
<View
|
|
356
|
+
animate={Animation.fadeIn('2s', 'ease-in-out')}
|
|
357
|
+
backgroundColor="theme.primary"
|
|
358
|
+
padding={20}
|
|
359
|
+
>
|
|
360
|
+
This view will fade in slowly
|
|
361
|
+
</View>
|
|
141
362
|
```
|
|
142
363
|
|
|
143
|
-
|
|
364
|
+
### Creating Custom Animations
|
|
144
365
|
|
|
145
|
-
|
|
146
|
-
|
|
366
|
+
You can also create custom animations by defining your own keyframes:
|
|
367
|
+
|
|
368
|
+
```jsx
|
|
369
|
+
const customAnimation = {
|
|
370
|
+
from: { opacity: 0, transform: 'translateY(-50px)' },
|
|
371
|
+
to: { opacity: 1, transform: 'translateY(0)' },
|
|
372
|
+
duration: '1s',
|
|
373
|
+
timingFunction: 'ease-out'
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
<View
|
|
377
|
+
animate={customAnimation}
|
|
378
|
+
backgroundColor="theme.primary"
|
|
379
|
+
padding={20}
|
|
380
|
+
>
|
|
381
|
+
This view will have a custom animation
|
|
382
|
+
</View>
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Combining Animations
|
|
386
|
+
|
|
387
|
+
You can combine multiple animations by using the `Animation.compose` function:
|
|
388
|
+
|
|
389
|
+
```jsx
|
|
390
|
+
const combinedAnimation = Animation.compose(
|
|
391
|
+
Animation.fadeIn(),
|
|
392
|
+
Animation.slideInUp()
|
|
393
|
+
);
|
|
394
|
+
|
|
395
|
+
<View
|
|
396
|
+
animate={combinedAnimation}
|
|
397
|
+
backgroundColor="theme.primary"
|
|
398
|
+
padding={20}
|
|
399
|
+
>
|
|
400
|
+
This view will fade in and slide up simultaneously
|
|
401
|
+
</View>
|
|
147
402
|
```
|
|
148
403
|
|
|
149
|
-
|
|
404
|
+
### Animation Events
|
|
150
405
|
|
|
151
|
-
|
|
152
|
-
- [Change Log](CHANGELOG.md)
|
|
153
|
-
- [Versioning Release Note](https://github.com/rize-network/app-studio/wiki/)
|
|
154
|
-
- [How to Apply for Being A Collaborator](https://github.com/rize-network/app-studio/wiki/Collaborators#how-to-apply-for-being-a-collaborator)
|
|
406
|
+
You can also listen to animation events using the `onAnimationStart`, `onAnimationEnd`, and `onAnimationIteration` props:
|
|
155
407
|
|
|
156
|
-
|
|
408
|
+
```jsx
|
|
409
|
+
<View
|
|
410
|
+
animate={Animation.bounce()}
|
|
411
|
+
onAnimationStart={() => console.log('Animation started')}
|
|
412
|
+
onAnimationEnd={() => console.log('Animation ended')}
|
|
413
|
+
backgroundColor="theme.primary"
|
|
414
|
+
padding={20}
|
|
415
|
+
>
|
|
416
|
+
This view will bounce
|
|
417
|
+
</View>
|
|
418
|
+
```
|
|
157
419
|
|
|
158
|
-
|
|
420
|
+
By leveraging these animation capabilities, you can create rich, interactive user interfaces with App-Studio.
|
|
159
421
|
|
|
160
|
-
|
|
422
|
+
## 10. Advanced Usage
|
|
161
423
|
|
|
162
|
-
|
|
424
|
+
Here's an advanced example showcasing various features of App-Studio, including animations:
|
|
425
|
+
|
|
426
|
+
```jsx
|
|
427
|
+
import { ThemeProvider, ResponsiveProvider, View, Span, Text, Button, Animation } from 'app-studio';
|
|
428
|
+
|
|
429
|
+
const theme = {
|
|
430
|
+
main: { primary: '#fff7ed' },
|
|
431
|
+
components: { button: { background: '#fff7ed' } }
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
const colors = {
|
|
435
|
+
main: { blue: '#94a3b8' },
|
|
436
|
+
palette: { blueGray: { 500: '#64748b' } }
|
|
437
|
+
};
|
|
163
438
|
|
|
164
|
-
|
|
439
|
+
function Example() {
|
|
440
|
+
return (
|
|
441
|
+
<ResponsiveProvider>
|
|
442
|
+
<ThemeProvider theme={theme} colors={colors}>
|
|
443
|
+
<Span
|
|
444
|
+
animate={Animation.fadeIn('1s', 'ease-out')}
|
|
445
|
+
backgroundColor="color.blue"
|
|
446
|
+
padding={10}
|
|
447
|
+
media={{
|
|
448
|
+
mobile: {
|
|
449
|
+
padding: 20
|
|
450
|
+
}
|
|
451
|
+
}}
|
|
452
|
+
>
|
|
453
|
+
Base element
|
|
454
|
+
</Span>
|
|
455
|
+
<View
|
|
456
|
+
animate={Animation.slideInRight()}
|
|
457
|
+
backgroundColor="theme.primary"
|
|
458
|
+
margin={10}
|
|
459
|
+
width={200}
|
|
460
|
+
on={{ hover: { backgroundColor: 'color.blueGray.500' } }}
|
|
461
|
+
>
|
|
462
|
+
Hover to change color
|
|
463
|
+
</View>
|
|
464
|
+
<Button
|
|
465
|
+
animate={Animation.pulse('infinite')}
|
|
466
|
+
backgroundColor="theme.button.background"
|
|
467
|
+
>
|
|
468
|
+
Click here
|
|
469
|
+
</Button>
|
|
470
|
+
<Text
|
|
471
|
+
animate={Animation.typewriter('Hello', 100)}
|
|
472
|
+
color="theme.primary"
|
|
473
|
+
/>
|
|
474
|
+
</ThemeProvider>
|
|
475
|
+
</ResponsiveProvider>
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
```
|
|
165
479
|
|
|
166
|
-
## Roadmap
|
|
167
480
|
|
|
168
|
-
|
|
481
|
+
## 10. Contributing
|
|
169
482
|
|
|
170
|
-
|
|
483
|
+
We welcome all contributions to App-Studio. Please read our [contributing guide](https://ant.design/docs/react/contributing) and let's build a better App-Studio together.
|
|
171
484
|
|
|
172
|
-
|
|
485
|
+
For more detailed information on contributing, including how to apply for being a collaborator, please refer to our [GitHub repository](https://github.com/rize-network/app-studio).
|
|
173
486
|
|
|
174
|
-
##
|
|
487
|
+
## 11. License
|
|
175
488
|
|
|
176
|
-
|
|
177
|
-
[](https://opencollective.com/rize#support)
|
|
489
|
+
App-Studio is available under the MIT license. See the LICENSE file for more info.
|
|
178
490
|
|
|
179
|
-
|
|
491
|
+
---
|
|
180
492
|
|
|
181
|
-
|
|
493
|
+
For the latest updates, changelog, and more detailed information, please visit our [GitHub repository](https://github.com/rize-network/app-studio).
|