Skip to content

Commit a15759b

Browse files
author
Alban Bailly
committed
more styling updates
1 parent 60626ad commit a15759b

File tree

5 files changed

+31
-10
lines changed

5 files changed

+31
-10
lines changed

src/components/2_molecules/ResponseItem.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from "react";
2+
import Markdown from "react-markdown/with-html";
23

34
export const ResponseItem = props => {
45
const { response, r, m } = props;
@@ -27,7 +28,7 @@ export const ResponseItem = props => {
2728
const l = r.content.application_json.schema.properties[p];
2829
return (
2930
l && (
30-
<div key={i}>
31+
<div key={i} className="response-wrapper">
3132
<div className={`flex mb-2 pt-2 initResponse`}>
3233
<div className="w-1/4">
3334
<div>
@@ -123,7 +124,9 @@ export const ResponseItem = props => {
123124
</div>
124125
{data.enum && (
125126
<div className="flex flex-wrap mb-2">
126-
<span className="text-sm">Enum: </span>
127+
<span className="text-sm mr-2">
128+
Enum:
129+
</span>
127130
{data.enum.map((e, i) => {
128131
return (
129132
<span
@@ -167,8 +170,8 @@ export const ResponseItem = props => {
167170
</div>
168171
{data.enum && (
169172
<div className="flex flex-wrap mb-2">
170-
<span className="text-sm">
171-
Enum:{" "}
173+
<span className="text-sm mr-2">
174+
Enum:
172175
</span>
173176
{data.enum.map((e, i) => {
174177
return (

src/components/5_templates/api.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
44
import { atomDark } from "react-syntax-highlighter/dist/esm/styles/prism";
55
import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
66
import Clipboard from "react-clipboard.js";
7+
import Markdown from "react-markdown/with-html";
78
import "react-tabs/style/react-tabs.css";
89

910
import Layout from "../../components/4_layouts/layout";
@@ -65,7 +66,13 @@ const apiPage = ({ data }) => {
6566
</span>
6667
<span>https://api.linode.com/v4{n.name}</span>
6768
</div>
68-
{m.description}
69+
70+
<Markdown
71+
source={m.description}
72+
escapeHtml={false}
73+
className="mt-8 api-desc"
74+
/>
75+
6976
{m.parameters && (
7077
<p className="mb-2">
7178
<b>Query Parameters</b>

src/css/components/0_utilities/typography.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ input[type="text"] {
2222
@apply p-2 mt-2 mb-4 bg-ThemeBeige block;
2323
}
2424

25+
.api-desc code {
26+
@apply font-normal px-1 bg-ThemeTagGrey inline text-sm;
27+
padding-top: 4px;
28+
padding-bottom: 3px;
29+
width: fit-content;
30+
}
31+
2532
.api-body table {
2633
width: 100%;
2734
@apply border border-BaseGrey;

src/css/components/1_atoms/tag.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.tag {
2-
@apply font-normal px-2 bg-ThemeTagGrey text-BaseBlackFull text-sm;
3-
padding-top: 6px;
4-
padding-bottom: 5px;
2+
@apply font-normal inline-block px-1 bg-ThemeTagGrey text-BaseBlackFull text-sm;
3+
padding-top: 4px;
4+
padding-bottom: 3px;
55
width: fit-content;
66
transition: background-color 225ms ease-in-out, color 225ms ease-in-out;
77
line-height: 1;

src/css/components/4_pages/api-page.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,12 @@
7272
}
7373

7474
.initResponse {
75-
border-top-width: 1px;
76-
@apply border-grey-light;
75+
/* border-top-width: 1px;
76+
@apply border-grey-light; */
77+
}
78+
79+
.response-wrapper .initResponse:first-child {
80+
/* border: 0; */
7781
}
7882

7983
.subResponse {

0 commit comments

Comments
 (0)