"...common/git@developer.sourcefind.cn:Wenxuan/LightX2V.git" did not exist on "e251e4dc5d94979dc42e862b0796e9e3c2595591"
ConfigClassTable.js 1.59 KB
Newer Older
chenzk's avatar
v1.0  
chenzk committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import React from 'react';
import Link from '@docusaurus/Link';

export function ConfigClassTable({ classes }) {
  if (!classes || classes.length === 0) {
    return <p>No configuration classes available.</p>;
  }

  return (
    <div className="config-class-table-container">
      <table className="config-class-table">
        <thead>
          <tr>
            <th>Class</th>
            <th>Description</th>
            <th>Documentation</th>
          </tr>
        </thead>
        <tbody>
          {classes.map((cls, index) => (
            <tr key={index}>
              <td><code>{cls.name}</code></td>
              <td>{cls.description}</td>
              <td>
                {cls.link ? (
                  <Link to={cls.link}>View Details</Link>
                ) : (
                  ''
                )}
              </td>
            </tr>
          ))}
        </tbody>
      </table>

      <style jsx>{`
        .config-class-table-container {
          margin-bottom: 2rem;
          overflow-x: auto;
        }
        
        .config-class-table {
          width: 100%;
          border-collapse: collapse;
        }
        
        .config-class-table th,
        .config-class-table td {
          padding: 8px 12px;
          text-align: left;
          border: 1px solid var(--ifm-table-border-color);
        }
        
        .config-class-table th {
          background-color: var(--ifm-table-head-background);
        }
        
        .config-class-table tr:nth-child(even) {
          background-color: var(--ifm-table-stripe-background);
        }
      `}</style>
    </div>
  );
}