I am trying to add padding for table head and table rows in Tailwind based React App.
Here's my code:
import React from "react";
import "./styles.css";
import "./styles/tailwind-pre-build.css";
export default function App() {
return (
<table className="w-full px-2 rounded-t-md">
<thead className="text-white bg-blue-600 text-left border border-red-600 p-2">
<tr className="w-full p-2">
<th className="font-medium">App Name</th>
<th className="font-medium">Owner</th>
<th className="font-medium">Date Created</th>
<th className="font-medium">Scopes</th>
<th className="font-medium">Actions</th>
</tr>
</thead>
<tbody>
<tr className="p-2">
<td>Test App</td>
<td>Shivam Sahil</td>
<td>20 May 2022, 19:58 AM</td>
<td className="break-words">all.create all.update all.read</td>
<td>Edit</td>
</tr>
</tbody>
</table>
);
}
For some reason the padding doesn't seem to happen at all. I tried to inspect and check but even when adding padding in styles it won't show up, can someone help me understand what wrong am I doing here?
Here's the live sandbox:https://codesandbox.io/s/tailwind-css-and-react-forked-xwvdue?file=/src/App.js:0-884