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 CSS classnames #21

Merged
merged 1 commit into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '8fd717a59276874d7127b38319ea255f');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '563e7517e9360406fa4bff7cf1d8dc9f');
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/index.js.map

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions src/components/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const baseButtonStyles = [
];

const baseButtonLinkStyles = [
'bg-transparent',
'outline-none',
'text-blue-700',
'hover:text-black',
'focus:text-black',
Expand Down Expand Up @@ -84,11 +86,12 @@ export default function Event( {
className
) }
>
<div>
<div className={ cx( 'event__single--innerWrapper' ) }>
{ image ? (
<img
src={ image }
className={ cx(
'event__single--image',
'block',
'h-32',
'flex-none',
Expand All @@ -105,10 +108,11 @@ export default function Event( {
) : null }
<div
className={ cx(
'event__single--detailsWrapper',
'border-r',
'border-b',
'border-l',
'border-grey-light',
'border-gray-200',
'bg-white',
'rounded-b',
'py-4',
Expand Down Expand Up @@ -146,7 +150,7 @@ export default function Event( {
className={ cx(
'event__details--dateDay',
'text-xl',
'text-grey-800',
'text-gray-800',
'my-0',
'font-sans',
'whitespace-no-wrap'
Expand Down Expand Up @@ -205,7 +209,7 @@ export default function Event( {
className={ cx(
'event__details--date',
'font-sans',
'text-grey-dark',
'text-black',
'text-xs',
'font-medium',
'm-0'
Expand All @@ -227,7 +231,7 @@ export default function Event( {
<p
className={ cx(
'font-sans',
'text-grey-dark',
'text-black',
'text-xs',
'm-0',
'truncate'
Expand All @@ -241,7 +245,7 @@ export default function Event( {
<p
className={ cx(
'font-sans',
'text-grey-dark',
'text-black',
'text-xs',
'm-0',
'truncate'
Expand All @@ -257,7 +261,7 @@ export default function Event( {
<p
className={ cx(
'text-sm',
'text-grey-dark',
'text-black',
'flex',
'items-center',
'font-sans',
Expand Down
17 changes: 15 additions & 2 deletions src/components/EventList.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ export default function EventList( { events, attributes } ) {
} = attributes;

return (
<div className={ cx( 'flex', 'flex-wrap', 'justify-center' ) }>
<div
className={ cx(
'event__list',
'flex',
'flex-wrap',
'justify-center'
) }
>
{ events?.length > 0 ? (
events.map( ( event ) => (
<Event
Expand All @@ -37,7 +44,13 @@ export default function EventList( { events, attributes } ) {
/>
) )
) : (
<p className={ cx( 'text-base', 'text-orange-eventbrite' ) }>
<p
className={ cx(
'event__list--noEventsText',
'text-base',
'text-orange-eventbrite'
) }
>
{ noEventsText }
</p>
) }
Expand Down
10 changes: 5 additions & 5 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module.exports = {
important: true,
purge: [
'./src/**/*.js',
'./src/**/*.jsx',
],
important: true,
purge: [ './src/**/*.js', './src/**/*.jsx' ],
theme: {
extend: {
colors: {
Expand All @@ -16,4 +13,7 @@ module.exports = {
},
},
},
variants: {
textColor: [ 'responsive', 'hover', 'focus', 'active' ],
},
};