feat: columns of type number/percent in the table are right-aligned
This commit is contained in:
		
							parent
							
								
									dd79cb05bf
								
							
						
					
					
						commit
						592b45f5f7
					
				| @ -12,7 +12,7 @@ export const ReadPretty: React.FC<InputProps & InputNumberProps> = (props: any) | |||||||
|   } |   } | ||||||
|   const precision = Math.max(getNumberPrecision(String(value)), getNumberPrecision(step)); |   const precision = Math.max(getNumberPrecision(String(value)), getNumberPrecision(step)); | ||||||
|   return ( |   return ( | ||||||
|     <div> |     <div className={'nb-read-pretty-input-number'}> | ||||||
|       {addonBefore} |       {addonBefore} | ||||||
|       {toFixed(String(value), '.', precision)} |       {toFixed(String(value), '.', precision)} | ||||||
|       {addonAfter} |       {addonAfter} | ||||||
|  | |||||||
| @ -100,6 +100,9 @@ export const components = { | |||||||
|           css` |           css` | ||||||
|             max-width: 300px; |             max-width: 300px; | ||||||
|             white-space: nowrap; |             white-space: nowrap; | ||||||
|  |             .nb-read-pretty-input-number { | ||||||
|  |               text-align: right; | ||||||
|  |             } | ||||||
|           `,
 |           `,
 | ||||||
|         )} |         )} | ||||||
|       /> |       /> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user