Fixed color and alignment in data table (#103)

* Fixed color and alignment in the data table

* fix: fixed column width
This commit is contained in:
Ahtisham Shahid
2021-04-30 13:11:57 +05:00
committed by GitHub
parent b73b710777
commit 37873f0f4e
4 changed files with 37 additions and 6 deletions

View File

@@ -7,3 +7,4 @@
@import "~@edx/frontend-component-footer/dist/footer";
@import "proctored-exam-settings/proctoredExamSettings";
@import "pages-and-resources/discussions/app-list/AppList";

View File

@@ -77,10 +77,13 @@ function AppList({ intl }) {
{intl.formatMessage(messages.supportedFeatures)}
</h3>
<FeaturesTable
apps={apps}
features={features}
/>
<div className="app-list-data-table">
<FeaturesTable
apps={apps}
features={features}
/>
</div>
</div>
);
}

View File

@@ -0,0 +1,27 @@
.app-list-data-table {
table {
table-layout: fixed;
}
.pgn__data-table-container {
tr {
th {
background-color: $white;
text-align: center;
.d-flex, span {
display: block !important;
}
}
td {
background-color: $white;
.pgn__data-table-cell-wrap {
max-width: unset;
}
}
}
}
}

View File

@@ -19,11 +19,11 @@ function FeaturesTable({ apps, features, intl }) {
// If our app's set of feature Ids includes this feature, return a checkmark.
// i.e, if this app has the current feature, check it!
appCheckmarkCells[app.id] = app.featureIds.includes(feature.id) ? (
<div key={`${app.id}&${feature.id}`}>
<div className="text-center" key={`${app.id}&${feature.id}`}>
<FontAwesomeIcon icon={faCheck} color="green" />
</div>
) : (
<div key={`${app.id}&${feature.id}`}><Remove /></div>
<div className="text-center" key={`${app.id}&${feature.id}`}><Remove /></div>
);
});