Skip to content

Commit 2643142

Browse files
authored
Doc style fix 2 (#14)
1 parent 675c704 commit 2643142

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

.github/workflows/styleguide.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches:
55
- main
6-
pull_request_target:
6+
pull_request:
77
types:
88
- opened
99
- synchronize
@@ -30,9 +30,10 @@ jobs:
3030
- run: yarn styleguide:build
3131

3232
- name: Deploy 🚀
33+
if: github.event_name != 'pull_request'
3334
uses: JamesIves/[email protected]
3435
env:
35-
BRANCH: "${{ github.event_name == 'pull_request_target' && github.head_ref || 'main' }}"
36+
BRANCH: "${{ github.event_name == 'pull_request' && github.head_ref || 'main' }}"
3637
with:
3738
token: ${{ secrets.BOT_PAT }}
3839
branch: ${{ env.BRANCH }} # The branch the action should deploy to.

styleguide/styles.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
import { Theme } from 'react-styleguidist/lib/typings/RsgTheme';
22

3-
module.exports = function styles(theme: Theme) {
4-
return {
5-
Playground: {
6-
preview: {
7-
paddingLeft: 0,
8-
paddingRight: 0,
9-
borderWidth: [[0, 0, 1, 0]],
10-
borderRadius: 0,
3+
module.exports = {
4+
styles: (theme: Theme) => {
5+
return {
6+
Playground: {
7+
preview: {
8+
paddingLeft: 0,
9+
paddingRight: 0,
10+
borderWidth: [[0, 0, 1, 0]],
11+
borderRadius: 0,
12+
},
1113
},
12-
},
13-
Code: {
14-
code: {
15-
// make inline code example appear the same color as links
16-
color: theme.color.link,
17-
fontSize: 14,
14+
Code: {
15+
code: {
16+
// make inline code example appear the same color as links
17+
color: theme.color.link,
18+
fontSize: 14,
19+
},
1820
},
19-
},
20-
};
21+
};
22+
},
2123
};

0 commit comments

Comments
 (0)