Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug theme in playground app #33

Merged
merged 28 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
46b9ba6
Add basic content: types, basic components and initial architecture
magicmatatjahu Nov 8, 2018
25731f5
Add Schema type and improve basic components
magicmatatjahu Nov 9, 2018
997a4e3
Add parser (validator and dereferencer for json and yaml)
magicmatatjahu Nov 9, 2018
5cce961
Add components: Messages, Schemas and Topics
magicmatatjahu Nov 9, 2018
9a1fa9d
Add Message component and improve Messages components
magicmatatjahu Nov 9, 2018
e376cc4
Big commit
magicmatatjahu Nov 12, 2018
6c53350
Improve components for better passing custom theme.
magicmatatjahu Nov 15, 2018
2f6321a
Improve kyma theme
magicmatatjahu Nov 16, 2018
07e637d
Audit packages
magicmatatjahu Nov 16, 2018
217d828
Add highlights in schemaExample component
magicmatatjahu Nov 16, 2018
159edd8
After review
magicmatatjahu Nov 18, 2018
45f63cb
Update package.json: add prettier and basic info of reposirtory
magicmatatjahu Nov 18, 2018
5de9286
Add tslint and prettier config file
magicmatatjahu Nov 18, 2018
6ed172b
Add Apache 2.0 license
magicmatatjahu Nov 18, 2018
28249d7
Setup tests configuration
magicmatatjahu Nov 20, 2018
fea738c
Split projects to two separate: playground and library and configure …
magicmatatjahu Nov 21, 2018
ed13f0b
Improve Playground app
magicmatatjahu Nov 22, 2018
e94b478
Add new mock and add function to remove null or undefined values from…
magicmatatjahu Nov 23, 2018
bf968c2
Add new License
magicmatatjahu Nov 23, 2018
c6995ef
Merge branch 'master' of https://github.com/kyma-incubator/asyncapi-r…
magicmatatjahu Nov 23, 2018
a8ee45f
Merge branch 'master' of https://github.com/kyma-incubator/asyncapi-r…
magicmatatjahu Nov 30, 2018
1e8f736
Merge branch 'master' of https://github.com/kyma-incubator/asyncapi-r…
magicmatatjahu Dec 4, 2018
c90c365
Merge branch 'master' of github.com:asyncapi/asyncapi-react
magicmatatjahu Dec 4, 2018
7e6627d
Merge branch 'master' of github.com:asyncapi/asyncapi-react
magicmatatjahu Dec 6, 2018
ad31428
Merge branch 'master' of github.com:asyncapi/asyncapi-react
magicmatatjahu Dec 9, 2018
3aa7465
Merge branch 'master' of github.com:asyncapi/asyncapi-react
magicmatatjahu Dec 9, 2018
6ba43f7
Merge branch 'master' of github.com:asyncapi/asyncapi-react
magicmatatjahu Jan 30, 2019
34d068b
Fix bug with theme in playground app
magicmatatjahu Jan 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions library/src/theme/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,10 @@ export const defaultTheme: ThemeInterface = {
`,
errorWrapper: css`
background-color: #ffffff;
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.15), 0 12px 20px 0 rgba(0, 0, 0, 0.1);
border-left: 6px solid #f44336;
border-radius: 4px;
color: #32363a;
font-family: 72;
font-family: '72';
font-size: 13px;
`,
errorHeader: css`
Expand Down
5 changes: 2 additions & 3 deletions playground/src/common/defaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,11 +606,10 @@ export const defaultTheme: ThemeInterface = {
`,
errorWrapper: css`
background-color: #ffffff;
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.15), 0 12px 20px 0 rgba(0, 0, 0, 0.1);
border-left: 6px solid #f44336;
border-radius: 4px;
color: #32363a;
font-family: 72;
font-family: '72';
font-size: 13px;
`,
errorHeader: css`
Expand Down Expand Up @@ -963,7 +962,7 @@ export const oldTheme: ThemeInterface = {
border-left: 6px solid #f44336;
border-radius: 4px;
color: #32363a;
font-family: 72;
font-family: '72';
font-size: 13px;
`,
errorHeader: css`
Expand Down
22 changes: 15 additions & 7 deletions playground/src/common/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
export const parse = <T extends {}>(str: string): T => {
return JSON.parse(str) as T
}
try {
return JSON.parse(str) as T;
} catch (e) {
return {} as T;
}
};

export const stringify = <T extends {}>(content: T): string => {
return JSON.stringify(content)
}
try {
return JSON.stringify(content);
} catch (e) {
return '';
}
};

export const fetchSchema = async (link: string): Promise<any> => {
const requestOptions = {
method: 'GET'
method: 'GET',
};

return fetch(link, requestOptions).then(handleResponse);
}
};

function handleResponse(response: any) {
return response.text().then((data: string) => data);
}
}