-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05f3cb04.50af216b.js
1 lines (1 loc) · 7.21 KB
/
05f3cb04.50af216b.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{165:function(e,n,t){"use strict";t.d(n,"a",(function(){return b})),t.d(n,"b",(function(){return y}));var r=t(0),a=t.n(r);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){l(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var d=a.a.createContext({}),u=function(e){var n=a.a.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},b=function(e){var n=u(e.components);return a.a.createElement(d.Provider,{value:n},e.children)},s="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},p=a.a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),b=u(t),s=r,p=b["".concat(o,".").concat(s)]||b[s]||m[s]||l;return t?a.a.createElement(p,i(i({ref:n},d),{},{components:t})):a.a.createElement(p,i({ref:n},d))}));function y(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=t.length,o=new Array(l);o[0]=p;var i={};for(var c in n)hasOwnProperty.call(n,c)&&(i[c]=n[c]);i.originalType=e,i[s]="string"==typeof e?e:r,o[1]=i;for(var d=2;d<l;d++)o[d]=t[d];return a.a.createElement.apply(null,o)}return a.a.createElement.apply(null,t)}p.displayName="MDXCreateElement"},177:function(e,n,t){"use strict";t.d(n,"a",(function(){return c}));var r=t(0),a=t.n(r),l=(t(20),t(413)),o=t(244);const i=e=>{let{type:n,children:t}=e,r=n;return"tip"===n&&(r="success"),"note"===n&&(r="secondary"),a.a.createElement(l.a,{theme:Object(o.b)()},a.a.createElement("div",{className:`admonition admonition-${n} alert alert--${r}`},a.a.createElement("div",{className:"admonition-heading"},a.a.createElement("h5",null,a.a.createElement("span",{className:"admonition-icon"},a.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},a.a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))),n.toLowerCase())),a.a.createElement("div",{className:"admonition-content"},a.a.createElement("p",null,t))))},c=()=>a.a.createElement(i,{type:"note"},"See"," ",a.a.createElement("a",{href:"/demos/#demo-environment"},a.a.createElement("b",null,a.a.createElement("i",null,"here")))," ","for more on the ",a.a.createElement("code",null,"GLOBAL_VARS")," we use in our demos")},67:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return o})),t.d(n,"metadata",(function(){return i})),t.d(n,"toc",(function(){return c})),t.d(n,"default",(function(){return u}));var r=t(3),a=(t(0),t(165)),l=(t(179),t(177));const o={id:"header-cell",title:"Header and Cell",hide_title:!0},i={unversionedId:"style/header-cell",id:"style/header-cell",isDocsHomePage:!1,title:"Header and Cell",description:"Styling Header & Cells",source:"@site/demos/style/header-cell.mdx",slug:"/style/header-cell",permalink:"/demos/style/header-cell",version:"current",sidebar:"sidebar",previous:{title:"Multi Sorting",permalink:"/demos/sort/multi"},next:{title:"Row",permalink:"/demos/style/rows"}},c=[{value:"Props",id:"props",children:[]},{value:"Usage",id:"usage",children:[]},{value:"Live Demo",id:"live-demo",children:[]}],d={toc:c};function u(e){let{components:n,...t}=e;return Object(a.b)("wrapper",Object(r.a)({},d,t,{components:n,mdxType:"MDXLayout"}),Object(a.b)("h1",{id:"styling-header--cells"},"Styling Header & Cells"),Object(a.b)("h2",{id:"props"},"Props"),Object(a.b)("table",null,Object(a.b)("thead",{parentName:"table"},Object(a.b)("tr",{parentName:"thead"},Object(a.b)("th",{parentName:"tr",align:null},"Field"),Object(a.b)("th",{parentName:"tr",align:null},"Type"),Object(a.b)("th",{parentName:"tr",align:null},"Description"))),Object(a.b)("tbody",{parentName:"table"},Object(a.b)("tr",{parentName:"tbody"},Object(a.b)("td",{parentName:"tr",align:null},Object(a.b)("inlineCode",{parentName:"td"},"column.cellStyle")),Object(a.b)("td",{parentName:"tr",align:null},"style object or func"),Object(a.b)("td",{parentName:"tr",align:null},"style to apply in specified cells")),Object(a.b)("tr",{parentName:"tbody"},Object(a.b)("td",{parentName:"tr",align:null},Object(a.b)("inlineCode",{parentName:"td"},"column.headerStyle")),Object(a.b)("td",{parentName:"tr",align:null},"style object"),Object(a.b)("td",{parentName:"tr",align:null},"style to apply in all header cells")))),Object(a.b)("h2",{id:"usage"},"Usage"),Object(a.b)("pre",null,Object(a.b)("code",{parentName:"pre",className:"language-jsx"},"import MaterialTable from '@material-table/core';\n\n<MaterialTable\n // ...\n columns={[\n {\n title: 'Name', field: 'name',\n cellStyle: {\n backgroundColor: '#039be5',\n color: '#FFF'\n },\n headerStyle: {\n backgroundColor: '#039be5',\n }\n }\n }\n ]}\n options={{\n headerStyle: {\n backgroundColor: '#01579b',\n color: '#FFF'\n }\n }}\n/>\n")),Object(a.b)("h2",{id:"live-demo"},"Live Demo"),Object(a.b)(l.a,{mdxType:"InfoBannerAboutGlobalVarsInDemos"}),Object(a.b)("pre",null,Object(a.b)("code",{parentName:"pre",className:"language-jsx",metastring:"live",live:!0},'function StyledHeaderAndCell() {\n return (\n <MaterialTable\n data={[\n {\n name: "Mehmet",\n surname: "Baran",\n birthYear: 1987,\n birthCity: 63,\n },\n {\n name: "Zerya Bet\xfcl",\n surname: "Baran",\n birthYear: 2017,\n birthCity: 34,\n },\n ]}\n columns={[\n {\n title: "Name",\n field: "name",\n cellStyle: {\n backgroundColor: "#039be5",\n color: "#FFF",\n },\n headerStyle: {\n backgroundColor: "#039be5",\n },\n },\n { title: "Surname", field: "surname" },\n { title: "Birth Year", field: "birthYear", type: "numeric" },\n {\n title: "Birth Place",\n field: "birthCity",\n lookup: { 34: "\u0130stanbul", 63: "\u015eanl\u0131urfa" },\n },\n ]}\n options={{\n headerStyle: {\n backgroundColor: "#01579b",\n color: "#FFF",\n },\n }}\n />\n );\n}\n')))}u.isMDXComponent=!0}}]);